Unable to get input in Python 3.6

I cannot get input in Python 3.6.
In some problems I use sys.stdin.readline() for single line or I loop in sys.stdline and it works fine.

But in other problems ( TREE2 for example) I gets an empty string again and again. Trying other options, with input() it fails reaching EOF (EOFError: EOF when reading a line) and raw_input() is not available.
Any suggestions?

You are probably not giving custom input

1 Like

I get this problem when submitting the code. I am not sure what custom input I should put when the problem’s input should be used.

I have noticed that I misunderstood the reply when submitted. If you run a code with “Run” that ends in an error and just after that you submit that code that ends in an error, on the website you see both replies simultaneously. Above the code you get the answer for the submission, and below the code you see the output of the previous run with “Run”, that has nothing to do with the submission. Now I see that the output from the “Run” remains even after the code has changed. I was understanding that the output I was getting was coming from the submission, and getting to the wrong conclusions.

1 Like