Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from math import *
- while True:
- n = int(input()) - 1
- a = floor(sqrt(n))
- x = 1
- y = a + 1
- b = n - a * a
- if b < a:
- x = b + 1
- y = a + 1
- else:
- x = a + 1
- y = 2 * a - b + 1
- print(f"{x}排{y}個")
Advertisement
Add Comment
Please, Sign In to add comment