110882024-07-06 21:58:35probaSzámjegycserepython3Wrong answer 0/10019ms3268 KiB
# 50, 00, 25, 75
#lista = [int(input()) for i in range(int(input()))]
lista = [25, 1010, 2577]

for i in lista:
    ok = False
    if i % 25 == 0:
        print(0)
        ok = True
    
    if not ok and '5' in str(i) and ('2' in str(i) or '7' in str(i)):
        if str(i)[-1]=='5' or str(i)[-2]=='2' or str(i)[-2]=='7':
            print(1)
            ok = True
        else:
            print(2)
            ok = True
    
    if not ok and '0' in str(i) and '5' in str(i):
        if str(i)[-1] == '0' or str(i)[-2]=='5':
            print(1)
            ok = True
        else:
            print(2)
            ok = True
    
    if not ok and str(i).count('0')>1:
        if str(i)[-1]=='0' or str(i)[-2]=='0':
            print(1)
            ok = True
        else:
            print(2)
            ok = True
            
    if not ok:
        print(-1)
        
        
        
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Wrong answer17ms3088 KiB
subtask20/21
2Wrong answer17ms3048 KiB
subtask30/23
3Wrong answer17ms3088 KiB
4Wrong answer18ms3100 KiB
5Wrong answer18ms3044 KiB
6Wrong answer18ms3088 KiB
7Wrong answer19ms3044 KiB
8Wrong answer17ms3024 KiB
9Wrong answer18ms3268 KiB
10Wrong answer17ms3044 KiB
11Wrong answer18ms3176 KiB
12Wrong answer18ms3068 KiB
13Wrong answer17ms3172 KiB
14Wrong answer17ms3192 KiB
15Wrong answer17ms3064 KiB
16Wrong answer17ms3160 KiB
17Wrong answer17ms3064 KiB
18Wrong answer17ms3064 KiB
19Wrong answer17ms3168 KiB
20Wrong answer17ms3216 KiB
21Wrong answer17ms3044 KiB
22Wrong answer17ms3120 KiB
23Wrong answer17ms3192 KiB
subtask40/41
24Wrong answer18ms2916 KiB
25Wrong answer17ms3116 KiB
26Wrong answer18ms3236 KiB
27Wrong answer17ms3084 KiB
28Wrong answer17ms3100 KiB
29Wrong answer17ms3100 KiB
30Wrong answer17ms3044 KiB
31Wrong answer17ms3044 KiB
32Wrong answer17ms2980 KiB
33Wrong answer17ms3088 KiB
34Wrong answer17ms3108 KiB
35Wrong answer17ms3044 KiB
36Wrong answer17ms3088 KiB
37Wrong answer17ms3188 KiB
38Wrong answer17ms3044 KiB
39Wrong answer17ms3044 KiB
40Wrong answer17ms3100 KiB
41Wrong answer17ms3044 KiB
42Wrong answer17ms3064 KiB
43Wrong answer17ms3068 KiB
44Wrong answer17ms3088 KiB
45Wrong answer18ms3052 KiB
46Wrong answer17ms3144 KiB
47Wrong answer17ms3192 KiB
subtask50/15
48Wrong answer17ms3088 KiB
49Wrong answer18ms3232 KiB
50Wrong answer17ms2916 KiB
51Wrong answer17ms3044 KiB
52Wrong answer18ms2916 KiB
53Wrong answer18ms3108 KiB
54Wrong answer17ms2916 KiB
55Wrong answer17ms3064 KiB
56Wrong answer17ms3044 KiB
57Wrong answer17ms3088 KiB
58Wrong answer17ms3172 KiB
59Wrong answer17ms2916 KiB
60Wrong answer17ms3048 KiB
61Wrong answer17ms3028 KiB
62Wrong answer17ms3192 KiB
63Wrong answer17ms3044 KiB
64Wrong answer17ms2972 KiB
65Wrong answer17ms3052 KiB
66Wrong answer17ms3192 KiB