119622024-11-22 14:49:45AdamSzámjegycserepython3Wrong answer 0/100510ms3584 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 '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
1Accepted14ms3132 KiB
subtask20/21
2Wrong answer164ms3128 KiB
subtask30/23
3Wrong answer504ms3384 KiB
4Wrong answer504ms3476 KiB
5Wrong answer497ms3384 KiB
6Wrong answer495ms3384 KiB
7Wrong answer509ms3384 KiB
8Wrong answer481ms3384 KiB
9Wrong answer503ms3216 KiB
10Wrong answer497ms3384 KiB
11Wrong answer493ms3420 KiB
12Wrong answer510ms3420 KiB
13Wrong answer488ms3396 KiB
14Wrong answer508ms3424 KiB
15Wrong answer500ms3380 KiB
16Wrong answer485ms3164 KiB
17Wrong answer493ms3412 KiB
18Wrong answer492ms3384 KiB
19Wrong answer490ms3384 KiB
20Wrong answer508ms3384 KiB
21Wrong answer499ms3324 KiB
22Wrong answer497ms3296 KiB
23Wrong answer477ms3392 KiB
subtask40/41
24Accepted16ms3320 KiB
25Accepted16ms3120 KiB
26Accepted16ms3128 KiB
27Accepted16ms3128 KiB
28Accepted16ms3084 KiB
29Accepted16ms3412 KiB
30Accepted14ms3032 KiB
31Accepted16ms3160 KiB
32Accepted16ms3308 KiB
33Wrong answer16ms3120 KiB
34Accepted16ms3132 KiB
35Accepted16ms3112 KiB
36Accepted21ms3092 KiB
37Accepted52ms3148 KiB
38Accepted17ms3036 KiB
39Accepted14ms3160 KiB
40Accepted16ms3068 KiB
41Accepted16ms3128 KiB
42Accepted20ms3016 KiB
43Accepted20ms3132 KiB
44Accepted21ms3056 KiB
45Accepted20ms3024 KiB
46Wrong answer16ms3092 KiB
47Wrong answer20ms3180 KiB
subtask50/15
48Wrong answer20ms3096 KiB
49Wrong answer17ms3584 KiB
50Wrong answer490ms3224 KiB
51Wrong answer17ms3268 KiB
52Wrong answer109ms3196 KiB
53Accepted18ms3128 KiB
54Accepted23ms3128 KiB
55Accepted67ms3188 KiB
56Accepted508ms3480 KiB
57Accepted17ms3564 KiB
58Accepted17ms3420 KiB
59Accepted17ms3564 KiB
60Accepted23ms2988 KiB
61Accepted21ms3128 KiB
62Accepted23ms3076 KiB
63Accepted21ms3128 KiB
64Accepted505ms3412 KiB
65Accepted501ms3384 KiB
66Accepted504ms3384 KiB