27752023-01-23 21:51:08kohumarkSzorzás gyakorláspython3Accepted 100/10017ms14272 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))
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted17ms11560 KiB
2Accepted16ms11844 KiB
subtask215/15
3Accepted17ms12228 KiB
subtask325/25
4Accepted16ms12072 KiB
5Accepted17ms12008 KiB
6Accepted17ms12432 KiB
7Accepted17ms12804 KiB
8Accepted17ms12688 KiB
9Accepted17ms12856 KiB
10Accepted17ms12840 KiB
11Accepted17ms12588 KiB
subtask420/20
12Accepted17ms13056 KiB
13Accepted17ms12924 KiB
subtask540/40
14Accepted17ms12920 KiB
15Accepted17ms12960 KiB
16Accepted17ms13168 KiB
17Accepted17ms13124 KiB
18Accepted17ms13536 KiB
19Accepted17ms13484 KiB
20Accepted17ms13656 KiB
21Accepted17ms13992 KiB
22Accepted17ms14272 KiB
23Accepted17ms14128 KiB