11960 | 2024-11-22 14:47:30 | Xetoxino | Számjegycsere | pypy3 | Wrong answer 0/100 | 472ms | 27244 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)
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 46ms | 19440 KiB | ||||
subtask2 | 0/21 | ||||||
2 | Wrong answer | 259ms | 26436 KiB | ||||
subtask3 | 0/23 | ||||||
3 | Wrong answer | 430ms | 26756 KiB | ||||
4 | Wrong answer | 435ms | 26856 KiB | ||||
5 | Wrong answer | 368ms | 24544 KiB | ||||
6 | Wrong answer | 441ms | 27028 KiB | ||||
7 | Wrong answer | 428ms | 26864 KiB | ||||
8 | Wrong answer | 388ms | 24772 KiB | ||||
9 | Wrong answer | 472ms | 27244 KiB | ||||
10 | Wrong answer | 404ms | 25700 KiB | ||||
11 | Wrong answer | 428ms | 26856 KiB | ||||
12 | Wrong answer | 430ms | 26872 KiB | ||||
13 | Wrong answer | 425ms | 27116 KiB | ||||
14 | Wrong answer | 375ms | 24608 KiB | ||||
15 | Wrong answer | 437ms | 26600 KiB | ||||
16 | Wrong answer | 388ms | 25028 KiB | ||||
17 | Wrong answer | 400ms | 24828 KiB | ||||
18 | Wrong answer | 402ms | 24916 KiB | ||||
19 | Wrong answer | 363ms | 24552 KiB | ||||
20 | Wrong answer | 374ms | 24556 KiB | ||||
21 | Wrong answer | 370ms | 24548 KiB | ||||
22 | Wrong answer | 432ms | 26148 KiB | ||||
23 | Wrong answer | 411ms | 26608 KiB | ||||
subtask4 | 0/41 | ||||||
24 | Accepted | 46ms | 19696 KiB | ||||
25 | Accepted | 43ms | 19876 KiB | ||||
26 | Accepted | 41ms | 19684 KiB | ||||
27 | Accepted | 39ms | 19636 KiB | ||||
28 | Accepted | 46ms | 19688 KiB | ||||
29 | Accepted | 41ms | 19652 KiB | ||||
30 | Accepted | 39ms | 19496 KiB | ||||
31 | Accepted | 45ms | 19588 KiB | ||||
32 | Accepted | 41ms | 19864 KiB | ||||
33 | Wrong answer | 46ms | 19700 KiB | ||||
34 | Accepted | 39ms | 19660 KiB | ||||
35 | Accepted | 54ms | 21324 KiB | ||||
36 | Accepted | 71ms | 21572 KiB | ||||
37 | Accepted | 101ms | 23008 KiB | ||||
38 | Accepted | 54ms | 21420 KiB | ||||
39 | Accepted | 54ms | 21460 KiB | ||||
40 | Accepted | 48ms | 21268 KiB | ||||
41 | Accepted | 56ms | 21428 KiB | ||||
42 | Accepted | 79ms | 21544 KiB | ||||
43 | Accepted | 71ms | 21476 KiB | ||||
44 | Accepted | 89ms | 21564 KiB | ||||
45 | Accepted | 71ms | 21488 KiB | ||||
46 | Wrong answer | 54ms | 21332 KiB | ||||
47 | Wrong answer | 71ms | 21484 KiB | ||||
subtask5 | 0/15 | ||||||
48 | Wrong answer | 75ms | 21468 KiB | ||||
49 | Wrong answer | 54ms | 21572 KiB | ||||
50 | Wrong answer | 432ms | 27084 KiB | ||||
51 | Wrong answer | 59ms | 21624 KiB | ||||
52 | Wrong answer | 172ms | 23272 KiB | ||||
53 | Accepted | 52ms | 21376 KiB | ||||
54 | Accepted | 82ms | 21476 KiB | ||||
55 | Accepted | 125ms | 23700 KiB | ||||
56 | Accepted | 314ms | 23028 KiB | ||||
57 | Accepted | 46ms | 21744 KiB | ||||
58 | Accepted | 48ms | 21744 KiB | ||||
59 | Accepted | 48ms | 21744 KiB | ||||
60 | Accepted | 76ms | 21484 KiB | ||||
61 | Accepted | 75ms | 21516 KiB | ||||
62 | Accepted | 79ms | 21764 KiB | ||||
63 | Accepted | 75ms | 21488 KiB | ||||
64 | Accepted | 310ms | 23020 KiB | ||||
65 | Accepted | 321ms | 23020 KiB | ||||
66 | Accepted | 319ms | 23012 KiB |