题解 | #取近似值#
取近似值
https://www.nowcoder.com/practice/3ab09737afb645cc82c35d56a5ce802a
print(int(float(input())+0.5)) #不要使用round函数,它并不能精确地实现四舍五入,例如round(4.5)=4
取近似值
https://www.nowcoder.com/practice/3ab09737afb645cc82c35d56a5ce802a
print(int(float(input())+0.5)) #不要使用round函数,它并不能精确地实现四舍五入,例如round(4.5)=4
相关推荐