This is the question ive been doing
QUESTION : http://codeforces.com/contest/460/problem/B
MY SOLUTION : http://ideone.com/i6fiRc
Codeforces says that on testcase 8 which is 5 9998 9998 my code gives the output as 0 but on my PC and on Ideone it gives the required output which is 1
1933785806
How is this possible???