118902024-11-15 15:53:08LenglZalanMorSzámjegycserepython3Wrong answer 0/100518ms3752 KiB
N = int(input())
m = 0
for i in range(N):
    K = input()
    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 answer165ms3132 KiB
subtask30/23
3Wrong answer483ms3380 KiB
4Wrong answer486ms3268 KiB
5Wrong answer481ms3396 KiB
6Wrong answer479ms3376 KiB
7Wrong answer485ms3384 KiB
8Wrong answer518ms3384 KiB
9Wrong answer488ms3404 KiB
10Wrong answer479ms3192 KiB
11Wrong answer488ms3384 KiB
12Wrong answer483ms3384 KiB
13Wrong answer488ms3384 KiB
14Wrong answer474ms3224 KiB
15Wrong answer490ms3384 KiB
16Wrong answer472ms3384 KiB
17Wrong answer485ms3220 KiB
18Wrong answer497ms3392 KiB
19Wrong answer488ms3384 KiB
20Wrong answer469ms3384 KiB
21Wrong answer493ms3264 KiB
22Wrong answer497ms3400 KiB
23Wrong answer467ms3404 KiB
subtask40/41
24Accepted17ms3116 KiB
25Accepted16ms3128 KiB
26Accepted16ms3312 KiB
27Accepted16ms3128 KiB
28Accepted16ms3060 KiB
29Accepted16ms3136 KiB
30Accepted16ms2996 KiB
31Accepted16ms3200 KiB
32Accepted16ms2928 KiB
33Wrong answer16ms3124 KiB
34Accepted14ms3064 KiB
35Accepted16ms3136 KiB
36Accepted20ms3128 KiB
37Accepted61ms2984 KiB
38Accepted16ms3004 KiB
39Accepted16ms3100 KiB
40Accepted16ms3128 KiB
41Accepted16ms2984 KiB
42Accepted19ms2988 KiB
43Accepted20ms3144 KiB
44Accepted19ms3128 KiB
45Accepted19ms3052 KiB
46Wrong answer17ms3128 KiB
47Wrong answer19ms3136 KiB
subtask50/15
48Wrong answer21ms3312 KiB
49Wrong answer17ms3568 KiB
50Wrong answer474ms3384 KiB
51Wrong answer17ms3204 KiB
52Wrong answer108ms3124 KiB
53Accepted17ms3132 KiB
54Accepted21ms3164 KiB
55Accepted65ms3128 KiB
56Accepted501ms3264 KiB
57Accepted17ms3752 KiB
58Accepted17ms3560 KiB
59Accepted17ms3412 KiB
60Accepted20ms3024 KiB
61Accepted21ms3128 KiB
62Accepted21ms3316 KiB
63Accepted21ms3128 KiB
64Accepted510ms3548 KiB
65Accepted507ms3384 KiB
66Accepted483ms3384 KiB