118922024-11-15 19:18:46LenglZalanMorSzámjegycserepython3Wrong answer 0/100555ms3644 KiB
N = int(input())
m = 0
M = 9
for i in range(N):
    K = input()
    if K == ['1','2','3','4','5','6','7','8','9']:
        m = -1
    else:
        if K[-2:] in ['00','25','50','75']:
            m = 0
        elif K[-2:] in ['52','05','57']:
            m = 1
        elif K[-1] == '5' and ('2' in K or '7' in K[:-1]):
            m = 1
        elif K[-1] == '0' and ('5' in K or '0' in K[:-1]):
            m = 1
        elif '2' in K and '5' in K:
            m = 2
        elif '5' in K and '7' in K:
            m = 2
        elif K.count('0') > 1:
            m = 2
        elif '5' in K and '0' in K:
            m = 2
        else:
             m = -1
    

        print(m)
        
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted14ms3128 KiB
subtask20/21
2Wrong answer163ms3128 KiB
subtask30/23
3Wrong answer500ms3384 KiB
4Wrong answer504ms3384 KiB
5Wrong answer507ms3288 KiB
6Wrong answer504ms3372 KiB
7Wrong answer509ms3412 KiB
8Wrong answer476ms3344 KiB
9Wrong answer497ms3412 KiB
10Wrong answer504ms3212 KiB
11Wrong answer499ms3384 KiB
12Wrong answer497ms3456 KiB
13Wrong answer495ms3200 KiB
14Wrong answer555ms3436 KiB
15Wrong answer497ms3308 KiB
16Wrong answer493ms3196 KiB
17Wrong answer504ms3388 KiB
18Wrong answer486ms3384 KiB
19Wrong answer488ms3384 KiB
20Wrong answer497ms3388 KiB
21Wrong answer509ms3276 KiB
22Wrong answer490ms3384 KiB
23Wrong answer476ms3452 KiB
subtask40/41
24Accepted16ms3128 KiB
25Accepted16ms3128 KiB
26Accepted16ms3132 KiB
27Accepted17ms2984 KiB
28Accepted16ms3048 KiB
29Accepted16ms2984 KiB
30Accepted16ms3160 KiB
31Accepted16ms3172 KiB
32Accepted16ms3128 KiB
33Wrong answer16ms3204 KiB
34Accepted16ms3348 KiB
35Accepted17ms3128 KiB
36Accepted19ms3080 KiB
37Accepted61ms2984 KiB
38Accepted16ms3048 KiB
39Accepted16ms3096 KiB
40Accepted17ms3128 KiB
41Accepted17ms3128 KiB
42Accepted19ms3172 KiB
43Accepted20ms3168 KiB
44Accepted20ms3124 KiB
45Accepted19ms3120 KiB
46Wrong answer16ms3172 KiB
47Wrong answer20ms3128 KiB
subtask50/15
48Wrong answer23ms3180 KiB
49Wrong answer17ms3644 KiB
50Wrong answer510ms3188 KiB
51Wrong answer17ms3088 KiB
52Wrong answer109ms3200 KiB
53Accepted17ms3108 KiB
54Accepted21ms3052 KiB
55Accepted67ms3184 KiB
56Accepted510ms3264 KiB
57Accepted17ms3568 KiB
58Accepted17ms3608 KiB
59Accepted17ms3560 KiB
60Accepted23ms3136 KiB
61Accepted21ms3128 KiB
62Accepted23ms3184 KiB
63Accepted21ms3128 KiB
64Accepted550ms3440 KiB
65Accepted513ms3396 KiB
66Accepted504ms3384 KiB