120392024-11-26 12:17:06DianaTaylorSzámjegycserepython3Wrong answer 0/100584ms3660 KiB
t=int(input())
for i in range(t):
    n=input()
    k=-1
    nullak=n.count("0")
    if len(n)>=2:
        if n[-2:] in ["00","25","50","75"]:
            k=0
        elif n[-2:] in ["52","05","57"]:
            k=1
        elif n[-1:] in ["0"] and n[:-1] in ["5"] or nullak>=2:
            k=1
        elif n[-1:] in ["5"] and n[:-1] in ["2"] or["7"]:
            k=1
        elif n[-2] == "2" and "5" in n:
            k=1
        elif n[-2] == "7" and "5" in n:
            k=1
        elif n[-2] == "5" and "0" in n:
            k=1
        elif n[-2] == "0" and nullak>=2:
            k=1
        elif "5" and "0" in n:
            k=2
        elif "5" and "7" in n:
            k=2
        elif "5" and "2" in n:
            k=2
        elif nullak >=2:
            k=2
        else:
            k=-1
    print(k)
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted16ms3192 KiB
subtask20/21
2Wrong answer179ms3128 KiB
subtask30/23
3Wrong answer513ms3388 KiB
4Wrong answer526ms3384 KiB
5Wrong answer528ms3384 KiB
6Wrong answer523ms3384 KiB
7Wrong answer518ms3212 KiB
8Wrong answer518ms3384 KiB
9Wrong answer533ms3384 KiB
10Wrong answer517ms3384 KiB
11Wrong answer526ms3384 KiB
12Wrong answer513ms3392 KiB
13Wrong answer500ms3384 KiB
14Wrong answer523ms3384 KiB
15Wrong answer513ms3416 KiB
16Wrong answer504ms3384 KiB
17Wrong answer584ms3384 KiB
18Wrong answer518ms3384 KiB
19Wrong answer512ms3372 KiB
20Wrong answer575ms3316 KiB
21Wrong answer517ms3216 KiB
22Wrong answer527ms3384 KiB
23Wrong answer529ms3384 KiB
subtask40/41
24Wrong answer14ms3216 KiB
25Wrong answer14ms3020 KiB
26Wrong answer16ms3092 KiB
27Wrong answer17ms3128 KiB
28Wrong answer17ms3128 KiB
29Wrong answer16ms3128 KiB
30Wrong answer16ms3000 KiB
31Wrong answer16ms3108 KiB
32Wrong answer16ms3072 KiB
33Wrong answer16ms3032 KiB
34Wrong answer16ms3012 KiB
35Wrong answer16ms3028 KiB
36Wrong answer20ms3128 KiB
37Accepted56ms3128 KiB
38Wrong answer17ms3128 KiB
39Wrong answer17ms3200 KiB
40Wrong answer16ms3132 KiB
41Wrong answer16ms3208 KiB
42Wrong answer20ms3100 KiB
43Wrong answer20ms3144 KiB
44Wrong answer20ms3148 KiB
45Wrong answer20ms3204 KiB
46Wrong answer16ms3324 KiB
47Wrong answer19ms3204 KiB
subtask50/15
48Wrong answer24ms3128 KiB
49Wrong answer18ms3660 KiB
50Wrong answer510ms3204 KiB
51Wrong answer20ms3052 KiB
52Wrong answer115ms3220 KiB
53Wrong answer17ms3128 KiB
54Wrong answer23ms3128 KiB
55Wrong answer67ms3128 KiB
56Wrong answer518ms3384 KiB
57Accepted19ms3556 KiB
58Wrong answer17ms3512 KiB
59Wrong answer17ms3580 KiB
60Wrong answer21ms3128 KiB
61Wrong answer21ms3116 KiB
62Wrong answer23ms3152 KiB
63Wrong answer21ms3020 KiB
64Wrong answer528ms3384 KiB
65Wrong answer518ms3252 KiB
66Wrong answer527ms3216 KiB