Hi
I am submitting a program written in JAVA which compiles and runs fine on my computer. But on submitting it, I get the error 'runtime error (NZEC) '. Why is this happening? My program expects a couple of command line arguments(the input and output test files). Is this someway related?

Regards

  • created

    Oct '09
  • last reply

    Oct '09
  • 1

    reply

  • 291

    views

  • 2

    users

  • 1

    link

Hi,
input and output ought to be consecutively read from standard input and printed into standard output. No arguments are passed to programs in SPOJ. See spoj.pl/tutorials/USERS/3 from more details.
On page mentioned above also description of error codes can be found. NZEC occurs when your program exits with non-zero code: in C "return 0" would fix it; in Java - well, you must be doing something that causes your program to terminate with non-zero code.