Pl debug my program

Question-:Contest Page | CodeChef
My Code-:Solution: 48384037 | CodeChef

Try this input:

3
24 1
24 1
24 2

thank you , Now its working

Is their any way to see the test cases as we see in codeforces?

No