11704 | 2024-11-06 22:38:13 | kkristof | Kiváló Számok | python3 | Runtime error 33/100 | 615ms | 5680 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)
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 14ms | 2872 KiB | ||||
subtask2 | 33/33 | ||||||
2 | Accepted | 16ms | 2988 KiB | ||||
3 | Accepted | 16ms | 2872 KiB | ||||
4 | Accepted | 16ms | 2868 KiB | ||||
5 | Accepted | 16ms | 3112 KiB | ||||
6 | Accepted | 16ms | 3064 KiB | ||||
7 | Accepted | 28ms | 2872 KiB | ||||
8 | Accepted | 148ms | 2952 KiB | ||||
subtask3 | 0/33 | ||||||
9 | Runtime error | 82ms | 3644 KiB | ||||
10 | Runtime error | 217ms | 4192 KiB | ||||
11 | Runtime error | 305ms | 4380 KiB | ||||
12 | Runtime error | 209ms | 4272 KiB | ||||
13 | Runtime error | 228ms | 4324 KiB | ||||
14 | Runtime error | 98ms | 3592 KiB | ||||
15 | Runtime error | 35ms | 3208 KiB | ||||
16 | Runtime error | 71ms | 3592 KiB | ||||
17 | Runtime error | 150ms | 3864 KiB | ||||
18 | Runtime error | 263ms | 4456 KiB | ||||
19 | Runtime error | 61ms | 3592 KiB | ||||
20 | Runtime error | 370ms | 4696 KiB | ||||
subtask4 | 0/34 | ||||||
21 | Runtime error | 593ms | 5468 KiB | ||||
22 | Runtime error | 54ms | 3528 KiB | ||||
23 | Runtime error | 595ms | 5680 KiB | ||||
24 | Runtime error | 615ms | 5508 KiB | ||||
25 | Runtime error | 402ms | 4968 KiB | ||||
26 | Runtime error | 158ms | 4024 KiB | ||||
27 | Runtime error | 433ms | 4884 KiB | ||||
28 | Runtime error | 351ms | 4632 KiB | ||||
29 | Runtime error | 37ms | 3332 KiB | ||||
30 | Runtime error | 287ms | 4572 KiB | ||||
31 | Runtime error | 277ms | 4596 KiB | ||||
32 | Runtime error | 16ms | 3128 KiB | ||||
33 | Runtime error | 28ms | 3120 KiB |