11890 | 2024-11-15 15:53:08 | LenglZalanMor | Számjegycsere | python3 | Wrong answer 0/100 | 518ms | 3752 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)
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 14ms | 3128 KiB | ||||
subtask2 | 0/21 | ||||||
2 | Wrong answer | 165ms | 3132 KiB | ||||
subtask3 | 0/23 | ||||||
3 | Wrong answer | 483ms | 3380 KiB | ||||
4 | Wrong answer | 486ms | 3268 KiB | ||||
5 | Wrong answer | 481ms | 3396 KiB | ||||
6 | Wrong answer | 479ms | 3376 KiB | ||||
7 | Wrong answer | 485ms | 3384 KiB | ||||
8 | Wrong answer | 518ms | 3384 KiB | ||||
9 | Wrong answer | 488ms | 3404 KiB | ||||
10 | Wrong answer | 479ms | 3192 KiB | ||||
11 | Wrong answer | 488ms | 3384 KiB | ||||
12 | Wrong answer | 483ms | 3384 KiB | ||||
13 | Wrong answer | 488ms | 3384 KiB | ||||
14 | Wrong answer | 474ms | 3224 KiB | ||||
15 | Wrong answer | 490ms | 3384 KiB | ||||
16 | Wrong answer | 472ms | 3384 KiB | ||||
17 | Wrong answer | 485ms | 3220 KiB | ||||
18 | Wrong answer | 497ms | 3392 KiB | ||||
19 | Wrong answer | 488ms | 3384 KiB | ||||
20 | Wrong answer | 469ms | 3384 KiB | ||||
21 | Wrong answer | 493ms | 3264 KiB | ||||
22 | Wrong answer | 497ms | 3400 KiB | ||||
23 | Wrong answer | 467ms | 3404 KiB | ||||
subtask4 | 0/41 | ||||||
24 | Accepted | 17ms | 3116 KiB | ||||
25 | Accepted | 16ms | 3128 KiB | ||||
26 | Accepted | 16ms | 3312 KiB | ||||
27 | Accepted | 16ms | 3128 KiB | ||||
28 | Accepted | 16ms | 3060 KiB | ||||
29 | Accepted | 16ms | 3136 KiB | ||||
30 | Accepted | 16ms | 2996 KiB | ||||
31 | Accepted | 16ms | 3200 KiB | ||||
32 | Accepted | 16ms | 2928 KiB | ||||
33 | Wrong answer | 16ms | 3124 KiB | ||||
34 | Accepted | 14ms | 3064 KiB | ||||
35 | Accepted | 16ms | 3136 KiB | ||||
36 | Accepted | 20ms | 3128 KiB | ||||
37 | Accepted | 61ms | 2984 KiB | ||||
38 | Accepted | 16ms | 3004 KiB | ||||
39 | Accepted | 16ms | 3100 KiB | ||||
40 | Accepted | 16ms | 3128 KiB | ||||
41 | Accepted | 16ms | 2984 KiB | ||||
42 | Accepted | 19ms | 2988 KiB | ||||
43 | Accepted | 20ms | 3144 KiB | ||||
44 | Accepted | 19ms | 3128 KiB | ||||
45 | Accepted | 19ms | 3052 KiB | ||||
46 | Wrong answer | 17ms | 3128 KiB | ||||
47 | Wrong answer | 19ms | 3136 KiB | ||||
subtask5 | 0/15 | ||||||
48 | Wrong answer | 21ms | 3312 KiB | ||||
49 | Wrong answer | 17ms | 3568 KiB | ||||
50 | Wrong answer | 474ms | 3384 KiB | ||||
51 | Wrong answer | 17ms | 3204 KiB | ||||
52 | Wrong answer | 108ms | 3124 KiB | ||||
53 | Accepted | 17ms | 3132 KiB | ||||
54 | Accepted | 21ms | 3164 KiB | ||||
55 | Accepted | 65ms | 3128 KiB | ||||
56 | Accepted | 501ms | 3264 KiB | ||||
57 | Accepted | 17ms | 3752 KiB | ||||
58 | Accepted | 17ms | 3560 KiB | ||||
59 | Accepted | 17ms | 3412 KiB | ||||
60 | Accepted | 20ms | 3024 KiB | ||||
61 | Accepted | 21ms | 3128 KiB | ||||
62 | Accepted | 21ms | 3316 KiB | ||||
63 | Accepted | 21ms | 3128 KiB | ||||
64 | Accepted | 510ms | 3548 KiB | ||||
65 | Accepted | 507ms | 3384 KiB | ||||
66 | Accepted | 483ms | 3384 KiB |