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