Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = str(float(input())).split('.')
- z = int(a[0])
- # x < z
- if z < 0:
- x = z - 1
- else:
- if a[1][0] == '0':
- x = z - 1
- else:
- x = z
- # y > z
- if z < 0:
- if a[1][0] == '0':
- y = z + 1
- else:
- y = z
- else:
- y = z + 1
- # z
- target = int(a[1][0])
- if target >= 5:
- if z < 0:
- z -= 1
- else:
- z += 1
- else:
- z = z
- print(x, y, z)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement