I wrote a solution to [295B](http://mirror.codeforces.com/contest/295/submission/23564081)... After getting wrong ans on test case 4 I tested my solution on [Custom Innovation](http://mirror.codeforces.com/contest/295/customtest) and it is showing the correct output for the 4th case.↵
↵
I tested my code in ideone also. [here](http://ideone.com/IMONbzSr1E9Z) is the ideone test.↵
It produces correct output both on CUSTOM INVOCATION and on Ideone.↵
↵
I can't figure out what is wrong with my submission. could somebody please help me?
↵
I tested my code in ideone also. [here](http://ideone.com/
It produces correct output both on CUSTOM INVOCATION and on Ideone.↵
↵
I can't figure out what is wrong with my submission. could somebody please help me?