getting W.A. INSM03

Getting W.A.would anybody give me the test cases where my code is failing…
problem link:- INSM03 Problem - CodeChef
solution:- CodeChef: Practical coding for everyone
I’ve tried these test cases, giving output as expected…
input:
11
5 11
5 12
5 13
5 14
5 15
3 7
3 5
2 6
3 4
4 3
6 2
output:
10
11
12
13
10
6
4
4
3
2
0

You can view others solutions in Codechef. So If you stuck at any problem you can take help from those solutions.

1 Like

good Idea. But it should be in comment I think.