题解 | #取近似值#
取近似值
https://www.nowcoder.com/practice/3ab09737afb645cc82c35d56a5ce802a
while True:
try:
n = input().split('.')
if int(n[-1]) / (10 ** len(n[-1])) >= 0.5:
print(int(n[0]) + 1)
else:
print(int(n[0]))
except:
break
Python刷华为机考题 文章被收录于专栏
无聊刷刷!
