求问为什么这是八十分?(python)

B2016 浮点数向零舍入

quniang @ 2024-01-20 22:47:06

n = eval(input()) if n > 0: print(f"{n//1:.0f}") else: print(f"{n//1+1:.0f}")


by nlhzh1818 @ 2024-01-21 22:12:10

@quniang 没那么难吧 num=float(input()) print(int(num)) 这不就好了?!


by quniang @ 2024-01-26 22:41:51

az....确实写复杂了,局限了,谢谢佬


|