I am submitting the solution for this problem in java and my code was running fine in the Eclipse IDE but why am I getting run time error here?Can please somebody explain? My soln:http://www.codechef.com/viewsolution/4137501
I guess its mostly because you are allocating an int array of size 10^6 during runtime. Try global allocation or using char array instead.
Also your code gives wrong ans for input: 999
what is the error code?
I code in C++. So, I can’t tell you whats wrong with your code but I can tell you about NZEC error (Common in C++/Java)
So for Java : NZEC will usually mean that your program either crashed or raised an uncaught exception.