NZEC error in python
this is my first submission in codechef
tried map(int,input().split()), int(raw_input().split())
code works perfectly in my ide
any help?

updated solution
now it shows wrong answer
custom input gives correct answer

Does it work if you choose PYTH 3.6 instead of PYPY?

is the code chef ide faulty?

ok switched to non ide mode and submitted
now it’s showing wrong answer…

Your PYTH3.6 submission is merely giving WA instead of RE.


Ah, you beat me :slight_smile:

I’m not a Python user, but I copy-n-pasted this AC PyPy solution and used the sample testcase as Custom Input and clicked Run, and got:

prog.cs(1,0): error CS1525: Unexpected symbol `test_cases'
Compilation failed: 1 error(s), 0 warnings

which seems weird to me.


Looks like I managed to use the C# compiler instead of the PyPy one, several times in a row XD

1 Like

i dont know what that means…im new to python
but check the pic i provided, works perfectly in jupyter notebook

Are you trying to compile a PyPy code using the C# compiler? XD

1 Like

I swear I double-checked this multiple times, but I just looked at the tab I had open and it was indeed C# XD


I thought this was a really implausible mistake to make, even for a berk like me, and I just saw this:

i.e. I chose C++14 from the drop-down, and it automatically filled in the code box with Java code. When I clicked Run, the page reloaded, and then in the dropdown box it said “Java (HotSpot 8u112)”! So definitely something odd going on.


Yea, that’s really odd. It’s working just fine on my machine now, although I’ve faced similar issues before. :thinking:
Maybe @admin can help.

1 Like

Yeah, I don’t think it’s an accident that Java is directly below C++14 and C# is directly below PyPy in the dropdown list. As the saying goes:


The codechef ide by default doesn’t takes any inputs by default. You always have to provide custom input to check or just submit it.

1 Like

100^{th} :heart:!

1 Like

Oh, thanks - quite an honour :slight_smile:


That is three

And that is off by one :smiley:

1 Like