题解 | #批量插入数据#
取近似值
http://www.nowcoder.com/practice/3ab09737afb645cc82c35d56a5ce802a
输入一个浮点数,如果其小数位位数大于0.5,则向上取整;否则向下取整。
-》巧用int()
n = float(input())
y = lambda x : int(x+0.5)
print(y(n))
取近似值
http://www.nowcoder.com/practice/3ab09737afb645cc82c35d56a5ce802a
-》巧用int()
n = float(input())
y = lambda x : int(x+0.5)
print(y(n))
相关推荐