166802025-05-08 18:05:57algoproKiváló Számokpypy3Runtime error 66/100340ms39344 KiB
# UUID: f89b49f2-9591-470d-aa28-8f175bd000c1
N= int(input())
#l=[]
if N>7 and N%2==0:
    print ("15"*(N//2))
    exit()
for i in range (10**(N-1)+2,10**N,3): #elsőnek a 3-mal oszthatókat keresem meg majd azokból válogatok
    #if i%3==0:
    #    l.append(i)

    only_five_and_ones = True
    for ii in str(i):
        if ii not in "15": # ["1","5"]
            only_five_and_ones = False
    
    if only_five_and_ones:
        print (i)
        exit()
# igen, igy el lehet donteni, hogy ez szam jo-e 1-5 szempontbol
print(-1)
    

    
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted39ms19436 KiB
subtask233/33
2Accepted39ms19256 KiB
3Accepted39ms19584 KiB
4Accepted43ms19356 KiB
5Accepted45ms19308 KiB
6Accepted46ms21416 KiB
7Accepted48ms21480 KiB
8Accepted63ms21808 KiB
subtask333/33
9Accepted46ms20184 KiB
10Accepted41ms20804 KiB
11Accepted41ms21204 KiB
12Accepted45ms20952 KiB
13Accepted48ms20964 KiB
14Accepted39ms20204 KiB
15Accepted43ms19688 KiB
16Accepted39ms19904 KiB
17Accepted46ms20612 KiB
18Accepted48ms21000 KiB
19Accepted43ms19944 KiB
20Accepted41ms21480 KiB
subtask40/34
21Runtime error340ms39344 KiB
22Runtime error93ms23192 KiB
23Accepted46ms22100 KiB
24Accepted41ms22340 KiB
25Accepted41ms21484 KiB
26Accepted48ms20456 KiB
27Accepted46ms21740 KiB
28Runtime error245ms32240 KiB
29Runtime error75ms22744 KiB
30Runtime error200ms29672 KiB
31Accepted39ms21140 KiB
32Runtime error64ms22504 KiB
33Runtime error71ms22856 KiB