@华为算法题

python实现

a = float(input())
t = int (a * 10)
g = t % 10
if g >= 5:
    print(int(t/10) + 1)
else:
    print(int(t/10))