Re: [Tutor] crashed with Runtime Error: NZEC (non-zero exit code)

2008-02-27 Thread bob gailer
This thread got started due to the DIV15 problem on the Sphere Online Judge. This is almost a "black box" test environment. Submit a program. If it generates the expected output you get "accepted". The other results are " compilation error", "time limit exceeded", " runtime error (followed by (

Re: [Tutor] crashed with Runtime Error: NZEC (non-zero exit code)

2008-02-27 Thread Eric Brunson
Alan Gauld wrote: > "Eric Brunson" <[EMAIL PROTECTED]> wrote > >> Alan Gauld wrote: >> Glad we both noted the smileys. :-) > However, there is a bit of a serious point here too in that > users never ask for data validation (at least mine never do!) > they just expect it. So I still maint

Re: [Tutor] crashed with Runtime Error: NZEC (non-zero exit code)

2008-02-27 Thread Alan Gauld
"Eric Brunson" <[EMAIL PROTECTED]> wrote > Alan Gauld wrote: > Which actually makes it a very good test since thats > exactly the kind of thing you should be testing for :-) Note the smiley... > A test suite that only checks valid data is a bad test. > > Testing for valid input seems to be outsi

Re: [Tutor] crashed with Runtime Error: NZEC (non-zero exit code)

2008-02-27 Thread Andrei Petre
i'm thinking the same way Eric do. On Wed, Feb 27, 2008 at 11:18 PM, Eric Brunson <[EMAIL PROTECTED]> wrote: > Alan Gauld wrote: > > "bob gailer" <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> wrote > > > > i don't really understand that. you are trying to say that the > tests > from the online judge

Re: [Tutor] crashed with Runtime Error: NZEC (non-zero exit code)

2008-02-27 Thread Eric Brunson
Alan Gauld wrote: "bob gailer" <[EMAIL PROTECTED]> wrote i don't really understand that. you are trying to say that the tests from the online judge are not "exactly good" ? Yes that's exactly what I'm saying. At least one test case has a non-decimal charact

Re: [Tutor] crashed with Runtime Error: NZEC (non-zero exit code)

2008-02-26 Thread Alan Gauld
"bob gailer" <[EMAIL PROTECTED]> wrote >> i don't really understand that. you are trying to say that the >> tests >> from the online judge are not "exactly good" ? > Yes that's exactly what I'm saying. At least one test case has a > non-decimal character. Which actually makes it a very good tes

Re: [Tutor] crashed with Runtime Error: NZEC (non-zero exit code)

2008-02-26 Thread bob gailer
Note I cc: [EMAIL PROTECTED] Please do so also so the other tutors can follow the discussion. Andrei Petre wrote: > the theory seems just like mine :) > > your way to implement it looks fine ( although it supports some > optimization :)) > > But: > > - i don't understand : > i = int(s) >

Re: [Tutor] crashed with Runtime Error: NZEC (non-zero exit code)

2008-02-26 Thread bob gailer
I will share my algorithm just for the heck of it and to see if you see any problem. Underlying theory: Divisible by 15 == divisible by 3 and divisible by 5 If a number is divisible by 3 any rearrangement of its digits is also divisible by 3. Therefore to get the largest number, put the di

Re: [Tutor] crashed with Runtime Error: NZEC (non-zero exit code)

2008-02-26 Thread bob gailer
Andrei Petre wrote: > https://www.spoj.pl/problems/DIV15/ I wrote my own version and submitted it. I got NZEC also. The evidence pointed to a character in the test data other than 0123456789. So I contrived a way to test for this and found that to be true. I don't know what the character is or w

Re: [Tutor] crashed with Runtime Error: NZEC (non-zero exit code)

2008-02-24 Thread bob gailer
Andrei Petre wrote: > Hello, > > I wrote a code for a problem and submitted to an online judge url please, and link to the specific problem -- Bob Gailer 919-636-4239 Chapel Hill, NC ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailm

Re: [Tutor] crashed with Runtime Error: NZEC (non-zero exit code)

2008-02-24 Thread Bob Gailer
OK I maintain what I wrote earlier: Did you run the code yourself? It would appear that you did not. Before submitting to an online judge run the code on your own computer. Can you do that? Do you know how? When you run it you will discover an error. Fix that and try again. [snip] -- Bob Gail

Re: [Tutor] crashed with Runtime Error: NZEC (non-zero exit code) WAIT!!!

2008-02-24 Thread Bob Gailer
Hold the phone! Ignore previous email. Working... -- Bob Gailer 919-636-4239 Chapel Hill, NC ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] crashed with Runtime Error: NZEC (non-zero exit code)

2008-02-24 Thread bob gailer
Andrei Petre wrote: > Hello, > > I wrote a code for a problem and submitted to an online judge, a > program that runs my program against a set of predefined input data. Did you run the code yourself? It would appear that you did not. Before submitting to an online judge run the code on your own c

[Tutor] crashed with Runtime Error: NZEC (non-zero exit code)

2008-02-24 Thread Andrei Petre
Hello, I wrote a code for a problem and submitted to an online judge, a program that runs my program against a set of predefined input data. I wrote it for exercise my python writing. In don't want to discuss the algorithm here! I dare to ask for help because the answer was : crashed with Runtim