Runtime error____ help me please

when i upolad this question i am getting “Runtime error”… can any body help me out

[code removed]

people are watching and i am not getting any replys
plsss do reply this is 1st java program pls help me

The name of your class must be “Main”

hey sorry to edit here… it gives compile error when i use name other than Main
when i use main i am getting runtime error
please help me

Your class name should be Main. If you are getting runtime error(nzec), then use try and catch in your code, atleast that’s what i did and it worked for me. But i doubt using it is the best solution. I face the same error sometimes even when i use methods with exit code zero. Don’t exactly know the reason of the error.

Try to solve some easy problem from practice section first ( http://ww2.codechef.com/problems/easy ), at least TEST ( http://ww2.codechef.com/problems/TEST ), to get familiar with environment.

No, your class name do NOT need to be Main, but your class CANNOT be public, see my solution for TEST problem - http://ww2.codechef.com/viewsolution/812461

I have to warn you, you cannot ask the question or publish the code related to actual contest, read guidelines for more details - http://discuss.ww2.codechef.com/questions/855/what-kind-of-comment-should-i-post-on-the-problem-page , that’s the reason why I removed the code from the question.

1 Like