2775 | 2023-01-23 21:51:08 | kohumark | Szorzás gyakorlás | python3 | Accepted 100/100 | 17ms | 14272 KiB |
#ChatGPT
def num_multiples(k):
digits_written = set()
multiple = k
counter = 0
while len(digits_written) < 10:
multiple_str = str(multiple)
for char in multiple_str:
digits_written.add(char)
multiple += k
counter += 1
return counter
n = int(input())
for i in range(n):
k = int(input())
print(num_multiples(k))
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 17ms | 11560 KiB | ||||
2 | Accepted | 16ms | 11844 KiB | ||||
subtask2 | 15/15 | ||||||
3 | Accepted | 17ms | 12228 KiB | ||||
subtask3 | 25/25 | ||||||
4 | Accepted | 16ms | 12072 KiB | ||||
5 | Accepted | 17ms | 12008 KiB | ||||
6 | Accepted | 17ms | 12432 KiB | ||||
7 | Accepted | 17ms | 12804 KiB | ||||
8 | Accepted | 17ms | 12688 KiB | ||||
9 | Accepted | 17ms | 12856 KiB | ||||
10 | Accepted | 17ms | 12840 KiB | ||||
11 | Accepted | 17ms | 12588 KiB | ||||
subtask4 | 20/20 | ||||||
12 | Accepted | 17ms | 13056 KiB | ||||
13 | Accepted | 17ms | 12924 KiB | ||||
subtask5 | 40/40 | ||||||
14 | Accepted | 17ms | 12920 KiB | ||||
15 | Accepted | 17ms | 12960 KiB | ||||
16 | Accepted | 17ms | 13168 KiB | ||||
17 | Accepted | 17ms | 13124 KiB | ||||
18 | Accepted | 17ms | 13536 KiB | ||||
19 | Accepted | 17ms | 13484 KiB | ||||
20 | Accepted | 17ms | 13656 KiB | ||||
21 | Accepted | 17ms | 13992 KiB | ||||
22 | Accepted | 17ms | 14272 KiB | ||||
23 | Accepted | 17ms | 14128 KiB |