110922024-07-06 22:16:51probaSzámjegycserepython3Wrong answer 0/100347ms8044 KiB
# 50, 00, 25, 75
lista = [int(input()) for i in range(int(input()))]

for i in lista:
    tovabb = True
    
    # osztható 25-tel    
    if i % 25 == 0:
        print(0)
        tovabb = False
    
    # van benne 5-ös továbbá 2 vagy 7-es
    if tovabb and '5' in str(i) and ('2' in str(i) or '7' in str(i)):
        if str(i)[-1]=='5' or (str(i)[-2]=='5' and (str(i)[-1]=='2' or str(i)[-1]=='7')):
            print(1)
            tovabb = False
        else:
            print(2)
            tovabb = False
    
    # van benne 5-ös és 0
    if tovabb and '0' in str(i) and '5' in str(i):
        if str(i)[-1] == '5' and str(i)[-2]=='0':
            print(1)
            tovabb = False
        else:
            print(2)
            tovabb = False
            

    # ha van benne 2 nulla
    if tovabb and str(i).count('0')>1:
        if str(i)[-1]=='0' or str(i)[-2]=='0':
            print(1)
            tovabb = False
        else:
            print(2)
            tovabb = False
            
    if tovabb:
        print(-1)
        
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted17ms3044 KiB
subtask20/21
2Wrong answer122ms4944 KiB
subtask30/23
3Wrong answer314ms7636 KiB
4Wrong answer314ms7640 KiB
5Wrong answer300ms7604 KiB
6Wrong answer331ms7764 KiB
7Wrong answer310ms7636 KiB
8Wrong answer326ms7640 KiB
9Wrong answer319ms7648 KiB
10Wrong answer319ms7692 KiB
11Wrong answer312ms7636 KiB
12Wrong answer312ms7784 KiB
13Wrong answer335ms7776 KiB
14Wrong answer307ms7636 KiB
15Wrong answer321ms7784 KiB
16Wrong answer328ms7784 KiB
17Wrong answer317ms7652 KiB
18Wrong answer314ms7768 KiB
19Wrong answer335ms8044 KiB
20Wrong answer330ms7640 KiB
21Wrong answer310ms7700 KiB
22Wrong answer316ms7640 KiB
23Wrong answer317ms7640 KiB
subtask40/41
24Accepted18ms3044 KiB
25Accepted19ms3040 KiB
26Accepted19ms3188 KiB
27Accepted19ms3320 KiB
28Accepted19ms3044 KiB
29Accepted18ms3084 KiB
30Accepted18ms3176 KiB
31Accepted17ms3044 KiB
32Accepted18ms2948 KiB
33Wrong answer18ms2972 KiB
34Accepted18ms3192 KiB
35Accepted17ms3060 KiB
36Accepted20ms3228 KiB
37Accepted46ms3428 KiB
38Accepted19ms3172 KiB
39Accepted17ms3064 KiB
40Accepted18ms3020 KiB
41Accepted18ms3056 KiB
42Accepted20ms3172 KiB
43Accepted20ms3320 KiB
44Accepted20ms3320 KiB
45Accepted21ms3188 KiB
46Wrong answer17ms3044 KiB
47Wrong answer20ms3172 KiB
subtask50/15
48Wrong answer119ms3684 KiB
49Runtime error18ms3304 KiB
50Wrong answer347ms7632 KiB
51Runtime error18ms3044 KiB
52Wrong answer98ms4528 KiB
53Runtime error17ms3064 KiB
54Accepted104ms3684 KiB
55Accepted65ms4196 KiB
56Accepted305ms7644 KiB
57Runtime error18ms3172 KiB
58Runtime error17ms3304 KiB
59Runtime error18ms3300 KiB
60Accepted100ms3684 KiB
61Accepted100ms3556 KiB
62Accepted143ms3684 KiB
63Accepted101ms3684 KiB
64Accepted308ms7552 KiB
65Accepted303ms7504 KiB
66Accepted305ms7632 KiB