Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from math import ceil, floor
- x = float(input())
- y = float('{:.3f}'.format(x % 1))
- if abs(y) >= 0.5:
- x = ceil(x)
- else:
- x = floor(x)
- print(x)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement