My program is successfully executed on codechef ide but when I’m going to submit it on snackdown it is telling wrong answer. Why is it so ?
same with me
Well it looks like your program does not handle EVERY test case proprely, as it should.
It is always a bit frustrating cause you cannot see the test cases that pose a problem, but try to think of all possible test cases to see if you forgot one (take special care of edge cases), and go through your code to see if you messed up.
Amongst my most common mistakes are problems with integer overflow, so who knows it might be that.