PRACTICE / RAINBOWA - python3.5 EOF / Input error?

I’ve submitted this solution:
Local it runs fine with

./ < rainbowa.input > rainbowa.output
$ python -V
Python 3.5.2

When I run in the Codechef IDE, I get the following error:

Traceback (most recent call last):
  File "./", line 29, in <module>
EOFError: EOF when reading a line

If I run with custom input taken from the chanllege: it works, but only with custom input selected.

Funny aside, when I copy an Accepted solution and try and run it, it gives the EOF error as well. So I’m wondering if it’s my web browser?

I’ve been banging my head on this with the googles and trial and error for a bit now.

If you know C++, try using same logic in that. Python is extremely sensitive to extra spaces/new lines. Cant say, if its a problem with test cases, so I can only suggest to switch to C++ and try once. If this problem recurs in every other problem you solve, then get back to us XD

When you run your program here, the computer gives some pre specified input. But when the input syntax of computer doesn’t match with your program input syntax it shows EOF error. For example, if in a program,you made it to take 2 inputs one after other other, but the computer gives 2 inputs at once,the it’ll give the error. To avoid this error ,make program which takes exact input in same syntax as in example of input and output.

Thank you, appreciate the response.