Андрей Филиппов 608 SwapFive 862 | Пуртов Богдан, 321 группа SwapFive 668 | ||||
---|---|---|---|---|---|
n | 1 | k = int(input()) | n | 1 | k = eval(input()) |
2 | N = 1 | 2 | s = 1 | ||
3 | while True: | 3 | while True: | ||
n | 4 | x = k * (10 ** N - 1) | n | 4 | tm = k * (10 ** s - 1) |
5 | if x % (10 * k - 1) == 0: | 5 | if tm % (10 * k - 1) == 0: | ||
6 | print(x // (10 * k - 1)) | 6 | print(tm // (10 * k - 1)) | ||
7 | break | 7 | break | ||
t | 8 | else: | t | ||
9 | N += 1 | 8 | s += 1 |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|