BMU1999's blog

By BMU1999, history, 4 weeks ago, In English,

For exp.: https://www.e-olymp.com/en/contests/12949/problems/123233

How can I write this in Python3?

I searched this on Google but it is not working.

Please help if you can.

 
 
 
 
  • Vote: I like it
  • -28
  • Vote: I do not like it

»
4 weeks ago, # |
  Vote: I like it -57 Vote: I do not like it

In my opinion it can't be done

»
4 weeks ago, # |
  Vote: I like it +26 Vote: I do not like it

There are many ways. For example:

while True:
    try: input_line = input()
    except EOFError: break
    solve(input_line)
»
4 weeks ago, # |
Rev. 4   Vote: I like it +16 Vote: I do not like it

You can import sys and use sys.stdin iterator: For example,

import sys

for line in sys.stdin:

print(line.rstrip('\n'))