I\'m getting runtime error (NZEC) when running the following code over at SPOJ. I\'d be very thankful if any of you would kindly point out what\'s going on.
I don't know what java returns when the main function is void, but this can be the reason of this error message. Spoj also checks the return value of your program, and it expects 0 (success/non-error code). I guess changing your main function to return 0 will fix this error message.
I just had this same error with a C program, and adding a return 0 changed the error to accepted.