117182024-11-07 16:46:46bajozsaKiváló Számokpython3Wrong answer 0/100611ms5496 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
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted16ms2872 KiB
subtask20/33
2Wrong answer16ms3320 KiB
3Accepted16ms3048 KiB
4Wrong answer16ms3128 KiB
5Wrong answer16ms3144 KiB
6Wrong answer16ms3132 KiB
7Wrong answer16ms3000 KiB
8Wrong answer16ms2984 KiB
subtask30/33
9Runtime error81ms3580 KiB
10Runtime error216ms4216 KiB
11Runtime error303ms4612 KiB
12Runtime error207ms4172 KiB
13Runtime error224ms4380 KiB
14Runtime error96ms3636 KiB
15Runtime error35ms3368 KiB
16Runtime error71ms3600 KiB
17Runtime error148ms3896 KiB
18Runtime error263ms4456 KiB
19Runtime error59ms3600 KiB
20Runtime error367ms4800 KiB
subtask40/34
21Runtime error591ms5468 KiB
22Runtime error54ms3520 KiB
23Runtime error589ms5496 KiB
24Runtime error611ms5448 KiB
25Runtime error395ms4940 KiB
26Runtime error156ms4044 KiB
27Runtime error432ms5024 KiB
28Runtime error342ms4764 KiB
29Runtime error37ms3392 KiB
30Runtime error282ms4468 KiB
31Runtime error273ms4496 KiB
32Runtime error17ms3128 KiB
33Runtime error27ms3128 KiB