|
|
вернуться в форумa = input() from math import sqrt for q in a.split()[::-1]: print("%.4F" % sqrt(float(q))) input() would only take one line as input. 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))) Thanks it worked. Really not obvious thing here. |
|
|