115982024-10-29 21:40:55KezdőSzámjegycserepython3Wrong answer 0/100550ms3760 KiB
T = int(input())
for i in range(T):
    N = input()
    if len(N) >= 2:
        if N[-2:] in ['00','25', '50', '75']:
            v = 0
        elif N[-1] == '5' and (('2' in N) or ('7' in N)):
            v = 1
        elif N[-1] == '0' and (('5' in N) or ('0' in N[:-1])):
            v = 1
        elif N[-2] in '72' and '5' in N:
            v = 1
        elif N[-2] == '5' and '0' in N:
            v = 1
        elif ('5' in N) and (('2' in N) or ('7' in N) or ('0' in N)):
            v = 2
        elif  N.count('0') >= 2:
            v = 2
        else:
            v = -1
    print(v)
    
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted16ms3128 KiB
subtask20/21
2Wrong answer163ms3080 KiB
subtask30/23
3Wrong answer488ms3384 KiB
4Wrong answer486ms3384 KiB
5Wrong answer483ms3384 KiB
6Wrong answer550ms3384 KiB
7Wrong answer486ms3408 KiB
8Wrong answer474ms3388 KiB
9Wrong answer488ms3400 KiB
10Wrong answer510ms3384 KiB
11Wrong answer472ms3412 KiB
12Wrong answer486ms3448 KiB
13Wrong answer485ms3384 KiB
14Wrong answer463ms3384 KiB
15Wrong answer469ms3384 KiB
16Wrong answer479ms3168 KiB
17Wrong answer479ms3384 KiB
18Wrong answer472ms3384 KiB
19Wrong answer472ms3384 KiB
20Wrong answer479ms3324 KiB
21Wrong answer490ms3384 KiB
22Wrong answer538ms3384 KiB
23Wrong answer455ms3384 KiB
subtask40/41
24Accepted16ms3128 KiB
25Accepted17ms3128 KiB
26Accepted16ms3128 KiB
27Accepted16ms3312 KiB
28Accepted16ms3120 KiB
29Accepted16ms3112 KiB
30Accepted16ms3128 KiB
31Accepted16ms3372 KiB
32Accepted17ms3120 KiB
33Wrong answer16ms3120 KiB
34Accepted16ms3128 KiB
35Accepted17ms3128 KiB
36Accepted20ms2980 KiB
37Runtime error16ms3068 KiB
38Accepted16ms3136 KiB
39Accepted16ms3176 KiB
40Accepted17ms3140 KiB
41Accepted16ms3008 KiB
42Accepted20ms3100 KiB
43Accepted20ms3148 KiB
44Accepted20ms3128 KiB
45Accepted20ms2968 KiB
46Wrong answer16ms3128 KiB
47Wrong answer20ms3080 KiB
subtask50/15
48Wrong answer21ms3320 KiB
49Wrong answer17ms3760 KiB
50Wrong answer470ms3408 KiB
51Wrong answer17ms3128 KiB
52Wrong answer108ms3184 KiB
53Accepted17ms3128 KiB
54Accepted23ms3148 KiB
55Accepted68ms3172 KiB
56Accepted500ms3324 KiB
57Accepted17ms3572 KiB
58Accepted17ms3560 KiB
59Accepted18ms3508 KiB
60Accepted23ms3120 KiB
61Accepted21ms2984 KiB
62Accepted23ms3128 KiB
63Accepted21ms3208 KiB
64Accepted490ms3384 KiB
65Accepted497ms3452 KiB
66Accepted474ms3384 KiB