Hi Amitava:
Could you provide an example in your problem statement? Also, as Evan says below, you should have more than one test case or it becomes a trivial matter to hard-code a particular answer.
Probably should add a couple more test cases so that silly people like me don't submit answers like this. ;)
847 Solvers
Find the sum of the elements in the "second" diagonal
880 Solvers
Back to basics 21 - Matrix replicating
904 Solvers
191 Solvers
208 Solvers