117042024-11-06 22:38:13kkristofKiváló Számokpython3Runtime error 33/100615ms5680 KiB
#!/usr/bin/env python3
# NOTE: it is recommended to use this even if you don't understand the following code.


# input data
N = int(input().strip())

# insert your code here
for szam in range(10**(N-1), 10**N):
    if szam % 3 == 0:
        talalt = 0
        for i in str(szam):
            if int(i) == 1 or int(i) == 5:
                talalt += 1
        if talalt == N:
            print(szam)
            break

if talalt != N:
    print(-1)
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted14ms2872 KiB
subtask233/33
2Accepted16ms2988 KiB
3Accepted16ms2872 KiB
4Accepted16ms2868 KiB
5Accepted16ms3112 KiB
6Accepted16ms3064 KiB
7Accepted28ms2872 KiB
8Accepted148ms2952 KiB
subtask30/33
9Runtime error82ms3644 KiB
10Runtime error217ms4192 KiB
11Runtime error305ms4380 KiB
12Runtime error209ms4272 KiB
13Runtime error228ms4324 KiB
14Runtime error98ms3592 KiB
15Runtime error35ms3208 KiB
16Runtime error71ms3592 KiB
17Runtime error150ms3864 KiB
18Runtime error263ms4456 KiB
19Runtime error61ms3592 KiB
20Runtime error370ms4696 KiB
subtask40/34
21Runtime error593ms5468 KiB
22Runtime error54ms3528 KiB
23Runtime error595ms5680 KiB
24Runtime error615ms5508 KiB
25Runtime error402ms4968 KiB
26Runtime error158ms4024 KiB
27Runtime error433ms4884 KiB
28Runtime error351ms4632 KiB
29Runtime error37ms3332 KiB
30Runtime error287ms4572 KiB
31Runtime error277ms4596 KiB
32Runtime error16ms3128 KiB
33Runtime error28ms3120 KiB