118932024-11-15 19:21:48LenglZalanMorSzámjegycserepython3Wrong answer 0/100563ms3648 KiB
N = int(input())
m = 0
M = 9
for i in range(N):
    K = input()
    if K == ['0','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 answer168ms3176 KiB
subtask30/23
3Wrong answer501ms3384 KiB
4Wrong answer509ms3304 KiB
5Wrong answer499ms3396 KiB
6Wrong answer507ms3384 KiB
7Wrong answer504ms3384 KiB
8Wrong answer488ms3176 KiB
9Wrong answer488ms3384 KiB
10Wrong answer517ms3384 KiB
11Wrong answer505ms3244 KiB
12Wrong answer507ms3440 KiB
13Wrong answer537ms3228 KiB
14Wrong answer504ms3252 KiB
15Wrong answer490ms3396 KiB
16Wrong answer510ms3328 KiB
17Wrong answer495ms3432 KiB
18Wrong answer483ms3384 KiB
19Wrong answer513ms3384 KiB
20Wrong answer500ms3340 KiB
21Wrong answer501ms3444 KiB
22Wrong answer493ms3240 KiB
23Wrong answer488ms3384 KiB
subtask40/41
24Accepted17ms3064 KiB
25Accepted16ms3120 KiB
26Accepted16ms3128 KiB
27Accepted16ms3124 KiB
28Accepted16ms3128 KiB
29Accepted17ms3080 KiB
30Accepted17ms3108 KiB
31Accepted16ms3128 KiB
32Accepted16ms2988 KiB
33Wrong answer17ms3128 KiB
34Accepted16ms3192 KiB
35Accepted17ms3116 KiB
36Accepted19ms3132 KiB
37Accepted63ms3120 KiB
38Accepted17ms2972 KiB
39Accepted16ms3200 KiB
40Accepted17ms3132 KiB
41Accepted17ms3128 KiB
42Accepted20ms3176 KiB
43Accepted20ms3068 KiB
44Accepted20ms3124 KiB
45Accepted21ms3060 KiB
46Wrong answer16ms3188 KiB
47Wrong answer20ms2992 KiB
subtask50/15
48Wrong answer21ms3132 KiB
49Wrong answer17ms3648 KiB
50Wrong answer493ms3184 KiB
51Wrong answer17ms3116 KiB
52Wrong answer108ms3184 KiB
53Accepted17ms3236 KiB
54Accepted24ms3216 KiB
55Accepted68ms3012 KiB
56Accepted563ms3436 KiB
57Accepted17ms3508 KiB
58Accepted17ms3528 KiB
59Accepted18ms3520 KiB
60Accepted21ms2960 KiB
61Accepted23ms3128 KiB
62Accepted23ms3128 KiB
63Accepted24ms3092 KiB
64Accepted513ms3384 KiB
65Accepted524ms3468 KiB
66Accepted501ms3496 KiB