Whats wrong with my code?
A couple of observations:
How many inputs we should get for this problem? There is no limit mentioned and the question seems something akward. Please resolve this problem
Knowing what is EOF and any searching engine are your best friends. For exemple, you can search: "python read up to eof" For example: https://stackoverflow.com/questions/15599639/what-is-the-perfect-counterpart-in-python-for-while-not-eof
"python read up to eof"
PS I use C++