119652024-11-22 14:51:23DoberBendeguzSzámjegycserepython3Wrong answer 0/100500ms3560 KiB
N = int(input())
m = -1
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
1Accepted17ms3136 KiB
subtask20/21
2Wrong answer163ms3128 KiB
subtask30/23
3Wrong answer481ms3384 KiB
4Wrong answer500ms3296 KiB
5Wrong answer479ms3384 KiB
6Wrong answer500ms3428 KiB
7Wrong answer488ms3404 KiB
8Wrong answer472ms3152 KiB
9Wrong answer497ms3384 KiB
10Wrong answer488ms3384 KiB
11Wrong answer479ms3384 KiB
12Wrong answer479ms3412 KiB
13Wrong answer490ms3388 KiB
14Wrong answer483ms3224 KiB
15Wrong answer483ms3384 KiB
16Wrong answer483ms3360 KiB
17Wrong answer479ms3412 KiB
18Wrong answer488ms3324 KiB
19Wrong answer495ms3328 KiB
20Wrong answer474ms3220 KiB
21Wrong answer476ms3272 KiB
22Wrong answer488ms3192 KiB
23Wrong answer481ms3384 KiB
subtask40/41
24Accepted17ms3168 KiB
25Accepted16ms3128 KiB
26Accepted16ms3128 KiB
27Accepted17ms3128 KiB
28Accepted17ms3120 KiB
29Accepted17ms2960 KiB
30Accepted16ms3096 KiB
31Accepted16ms3124 KiB
32Accepted16ms2992 KiB
33Wrong answer16ms2936 KiB
34Accepted17ms3292 KiB
35Accepted17ms2992 KiB
36Accepted21ms3256 KiB
37Accepted61ms3120 KiB
38Accepted16ms3128 KiB
39Accepted16ms3128 KiB
40Accepted16ms3144 KiB
41Accepted17ms2956 KiB
42Accepted20ms3008 KiB
43Accepted19ms3128 KiB
44Accepted21ms3148 KiB
45Accepted20ms2960 KiB
46Wrong answer16ms3128 KiB
47Wrong answer18ms3144 KiB
subtask50/15
48Wrong answer21ms2972 KiB
49Wrong answer17ms3560 KiB
50Wrong answer490ms3260 KiB
51Wrong answer17ms3128 KiB
52Wrong answer107ms3128 KiB
53Accepted17ms3128 KiB
54Accepted23ms3088 KiB
55Accepted67ms3132 KiB
56Accepted493ms3408 KiB
57Accepted17ms3560 KiB
58Accepted17ms3560 KiB
59Accepted17ms3512 KiB
60Accepted21ms3140 KiB
61Accepted21ms3080 KiB
62Accepted21ms3128 KiB
63Accepted21ms3128 KiB
64Accepted497ms3384 KiB
65Accepted499ms3384 KiB
66Accepted483ms3384 KiB