Getting run time error but AC on submition

I’m getting a runtime error when running the program but ac when submitting the program. Is anybody else having same problem? Do you know why?

If it’s not an ongoing contest, link your submission.

It’s very likely that this comment will fix your issue

It is a problem of July long contest.

are you running it locally or on codechef. If you are testing it on codechef then it might possible that you haven’t provided input.

Thanks you saved me. I usually try to run it and when I get some error, try to fix it without submitting and then quit, if I couldn’t get it running without any errors.
I wish I had asked this question long before.