| SwapFive/Beka00 | SwapFive/JuliaZ | ||||
|---|---|---|---|---|---|
| t | 1 | n = int(input()) | t | 1 | k = int(input()) |
| 2 | x = 10 * n - 1 | 2 | x = 10 * k - 1 | ||
| 3 | arr = [] | 3 | a = [] | ||
| 4 | while n not in arr: | 4 | while k not in a: | ||
| 5 | arr += [n] | 5 | a += [k] | ||
| 6 | print(10 * n // x, sep='', end='') | 6 | print(10 * k // x, sep='', end='') | ||
| 7 | n = 10 * n % x | 7 | k = 10 * k % x | ||
| 8 | print() | ||||
| Legends | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
| |||||||||