ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1001. Reverse Root

Please, tell me, why it is wrong? (Python 3.4)
Posted by Teiwaz 5 Mar 2015 05:47
a = input()
from math import sqrt
for q in a.split()[::-1]:
    print("%.4F" % sqrt(float(q)))
Re: Please, tell me, why it is wrong? (Python 3.4)
Posted by Yogendra Singh Chouhan 29 Apr 2016 07:30
input() would only take one line as input.
Re: Please, tell me, why it is wrong? (Python 3.4)
Posted by Tavy 26 Jul 2016 16:48
Try using sys.stdin.read() . For testing, copy the input from example, paste it, press enter and CTRL+D

import sys, math
_in = sys.stdin.read()

for nr in _in.split()[::-1]:
    print ("%.4f" % math.sqrt(float(nr)))
Re: Please, tell me, why it is wrong? (Python 3.4)
Posted by @Poltork 3 Aug 2016 00:32
in(input())
Re: Please, tell me, why it is wrong? (Python 3.4)
Posted by Borius 22 Jan 2017 13:08
Thanks it worked. Really not obvious thing here.