Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- i, j, count, k = 1, 0, 2, int(input())
- if k == 1:
- print(0, 0)
- else:
- while count < k:
- i -= 1
- j += 1
- count += 1
- if i == 0 and count < k:
- i, j = j + 1, i
- count += 1
- print(i, j)
- i, j = map(int, input().split())
- k = 2
- while i != 1 or j != 0:
- if j == 0:
- i, j = 0, i - 1
- k += 1
- i += 1
- j -= 1
- k += 1
- print(k)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement