Python3 取近似值
取近似值
http://www.nowcoder.com/questionTerminal/3ab09737afb645cc82c35d56a5ce802a
import math
while True:
try:
n = float(input())
if n % 1 == 0.5:
print(math.ceil(n))
else:
print(round(n))
except:
break