Cost of Momos-A

4

13 votes
Hard
Problem

Raju wants to purchase momos and cost of nth momo can only be determined by the determinant of matrix A of nxn.

The (i,j)th term of matrix is given as

enter image description here

A is 1 index based matrix.

Help him find the cost of M momos

HINT : You have to find the cumulative sum of determinants of matrix from 1 x 1 to M x M

Input 14

NOTE : You do not need to create a program for this problem you have to write your answers of given input in given code snippet.

  • To see how to submit solution please check this link
Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

enter image description here

enter image description here

Determinant of matrix 1x1 = 1

Determinant of matrix 2x2= -1

Cost of 2 momos= 1+ (-1) =0

Editor Image

?