questn link-http://www.spoj.com/problems/BISHOPS/
i have tried a no of test cases i couldnt find a single one giving wrong answer.
for n=1 i have handled the case.
and for other values of n iam using 2*n-2
i have tried a no of test cases i couldnt find a single one giving wrong answer.
for n=1 i have handled the case.
and for other values of n iam using 2*n-2
For the test case , n==5 , your code was printing 08 while the answer should be 8 . Here is your corrected
[1] .
If you find my answer useful please upvote and accept it as right answer .
Happy Coding !!!
[1]: http://ideone.com/ZPAa0k
thanks a ton
ac
Welcome