119772024-11-22 15:17:18XetoxinoSzámjegycserepython3Wrong answer 0/100575ms3696 KiB
N = int(input())
m = 0
for i in range(N):
    K = input()
    if len(K) >= 2:
        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 K[-2] == '2' and '5' in K:
            m = 1
        elif K[-2] == '7' and '5' in K:
            m = 1
        elif K[-2] == '5' and '0' in K:
            m = 1
        elif K[-2] == '0' and '0' in K:
            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
    else:
        m = -1
    print(m)
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted14ms3128 KiB
subtask20/21
2Wrong answer166ms3128 KiB
subtask30/23
3Wrong answer522ms3332 KiB
4Wrong answer527ms3380 KiB
5Wrong answer528ms3376 KiB
6Wrong answer523ms3388 KiB
7Wrong answer524ms3696 KiB
8Wrong answer507ms3384 KiB
9Wrong answer523ms3388 KiB
10Wrong answer510ms3384 KiB
11Wrong answer526ms3384 KiB
12Wrong answer509ms3384 KiB
13Accepted532ms3384 KiB
14Wrong answer514ms3328 KiB
15Wrong answer529ms3384 KiB
16Wrong answer508ms3328 KiB
17Wrong answer501ms3384 KiB
18Wrong answer522ms3384 KiB
19Accepted518ms3384 KiB
20Accepted508ms3204 KiB
21Wrong answer522ms3344 KiB
22Wrong answer523ms3384 KiB
23Wrong answer499ms3408 KiB
subtask40/41
24Accepted16ms3128 KiB
25Accepted16ms3196 KiB
26Accepted16ms3144 KiB
27Accepted16ms3128 KiB
28Accepted16ms3340 KiB
29Accepted17ms3128 KiB
30Accepted17ms3172 KiB
31Accepted16ms3176 KiB
32Accepted17ms3108 KiB
33Accepted16ms2976 KiB
34Accepted17ms3156 KiB
35Accepted17ms3200 KiB
36Accepted21ms3088 KiB
37Accepted54ms3076 KiB
38Accepted17ms3128 KiB
39Accepted17ms3128 KiB
40Accepted17ms3132 KiB
41Accepted17ms3140 KiB
42Accepted20ms3200 KiB
43Accepted20ms3060 KiB
44Accepted21ms3188 KiB
45Accepted20ms3132 KiB
46Accepted17ms3040 KiB
47Wrong answer20ms2980 KiB
subtask50/15
48Accepted21ms3324 KiB
49Accepted17ms3480 KiB
50Wrong answer532ms3384 KiB
51Accepted17ms3128 KiB
52Wrong answer114ms3192 KiB
53Accepted17ms3448 KiB
54Accepted23ms3196 KiB
55Accepted71ms3236 KiB
56Accepted537ms3384 KiB
57Accepted17ms3432 KiB
58Accepted17ms3508 KiB
59Accepted17ms3564 KiB
60Accepted23ms3044 KiB
61Accepted23ms3216 KiB
62Accepted23ms3200 KiB
63Accepted23ms3128 KiB
64Accepted550ms3384 KiB
65Accepted541ms3640 KiB
66Accepted575ms3384 KiB