11718 | 2024-11-07 16:46:46 | bajozsa | Kiváló Számok | python3 | Wrong answer 0/100 | 611ms | 5496 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())
szam=-1
min = pow(10,N-1)
max = pow(10,N)
for i in range(min,max):
szamjegyek = str(i)
db1 = 0
db5 = 0
for j in szamjegyek:
if j == "2" or j == "3" or j == "4" or j == "6" or j == "7" or j == "8" or j == "9":
break
if j == "1":
db1 += 1
if j == "5":
db5 += 1
if db1 == db5:
szam = i
break
print(szam) # print the result
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 16ms | 2872 KiB | ||||
subtask2 | 0/33 | ||||||
2 | Wrong answer | 16ms | 3320 KiB | ||||
3 | Accepted | 16ms | 3048 KiB | ||||
4 | Wrong answer | 16ms | 3128 KiB | ||||
5 | Wrong answer | 16ms | 3144 KiB | ||||
6 | Wrong answer | 16ms | 3132 KiB | ||||
7 | Wrong answer | 16ms | 3000 KiB | ||||
8 | Wrong answer | 16ms | 2984 KiB | ||||
subtask3 | 0/33 | ||||||
9 | Runtime error | 81ms | 3580 KiB | ||||
10 | Runtime error | 216ms | 4216 KiB | ||||
11 | Runtime error | 303ms | 4612 KiB | ||||
12 | Runtime error | 207ms | 4172 KiB | ||||
13 | Runtime error | 224ms | 4380 KiB | ||||
14 | Runtime error | 96ms | 3636 KiB | ||||
15 | Runtime error | 35ms | 3368 KiB | ||||
16 | Runtime error | 71ms | 3600 KiB | ||||
17 | Runtime error | 148ms | 3896 KiB | ||||
18 | Runtime error | 263ms | 4456 KiB | ||||
19 | Runtime error | 59ms | 3600 KiB | ||||
20 | Runtime error | 367ms | 4800 KiB | ||||
subtask4 | 0/34 | ||||||
21 | Runtime error | 591ms | 5468 KiB | ||||
22 | Runtime error | 54ms | 3520 KiB | ||||
23 | Runtime error | 589ms | 5496 KiB | ||||
24 | Runtime error | 611ms | 5448 KiB | ||||
25 | Runtime error | 395ms | 4940 KiB | ||||
26 | Runtime error | 156ms | 4044 KiB | ||||
27 | Runtime error | 432ms | 5024 KiB | ||||
28 | Runtime error | 342ms | 4764 KiB | ||||
29 | Runtime error | 37ms | 3392 KiB | ||||
30 | Runtime error | 282ms | 4468 KiB | ||||
31 | Runtime error | 273ms | 4496 KiB | ||||
32 | Runtime error | 17ms | 3128 KiB | ||||
33 | Runtime error | 27ms | 3128 KiB |