Wrong answer on codeforces but correct answer on Ideone and on my PC!

This is the question ive been doing

QUESTION : Problem - B - Codeforces

MY SOLUTION : i6fiRc - Online C++ Compiler & Debugging Tool - Ideone.com

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???

1 Like

here is your AC code

Same thing was happening with me…