11598 | 2024-10-29 21:40:55 | Kezdő | Számjegycsere | python3 | Wrong answer 0/100 | 550ms | 3760 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)
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 16ms | 3128 KiB | ||||
subtask2 | 0/21 | ||||||
2 | Wrong answer | 163ms | 3080 KiB | ||||
subtask3 | 0/23 | ||||||
3 | Wrong answer | 488ms | 3384 KiB | ||||
4 | Wrong answer | 486ms | 3384 KiB | ||||
5 | Wrong answer | 483ms | 3384 KiB | ||||
6 | Wrong answer | 550ms | 3384 KiB | ||||
7 | Wrong answer | 486ms | 3408 KiB | ||||
8 | Wrong answer | 474ms | 3388 KiB | ||||
9 | Wrong answer | 488ms | 3400 KiB | ||||
10 | Wrong answer | 510ms | 3384 KiB | ||||
11 | Wrong answer | 472ms | 3412 KiB | ||||
12 | Wrong answer | 486ms | 3448 KiB | ||||
13 | Wrong answer | 485ms | 3384 KiB | ||||
14 | Wrong answer | 463ms | 3384 KiB | ||||
15 | Wrong answer | 469ms | 3384 KiB | ||||
16 | Wrong answer | 479ms | 3168 KiB | ||||
17 | Wrong answer | 479ms | 3384 KiB | ||||
18 | Wrong answer | 472ms | 3384 KiB | ||||
19 | Wrong answer | 472ms | 3384 KiB | ||||
20 | Wrong answer | 479ms | 3324 KiB | ||||
21 | Wrong answer | 490ms | 3384 KiB | ||||
22 | Wrong answer | 538ms | 3384 KiB | ||||
23 | Wrong answer | 455ms | 3384 KiB | ||||
subtask4 | 0/41 | ||||||
24 | Accepted | 16ms | 3128 KiB | ||||
25 | Accepted | 17ms | 3128 KiB | ||||
26 | Accepted | 16ms | 3128 KiB | ||||
27 | Accepted | 16ms | 3312 KiB | ||||
28 | Accepted | 16ms | 3120 KiB | ||||
29 | Accepted | 16ms | 3112 KiB | ||||
30 | Accepted | 16ms | 3128 KiB | ||||
31 | Accepted | 16ms | 3372 KiB | ||||
32 | Accepted | 17ms | 3120 KiB | ||||
33 | Wrong answer | 16ms | 3120 KiB | ||||
34 | Accepted | 16ms | 3128 KiB | ||||
35 | Accepted | 17ms | 3128 KiB | ||||
36 | Accepted | 20ms | 2980 KiB | ||||
37 | Runtime error | 16ms | 3068 KiB | ||||
38 | Accepted | 16ms | 3136 KiB | ||||
39 | Accepted | 16ms | 3176 KiB | ||||
40 | Accepted | 17ms | 3140 KiB | ||||
41 | Accepted | 16ms | 3008 KiB | ||||
42 | Accepted | 20ms | 3100 KiB | ||||
43 | Accepted | 20ms | 3148 KiB | ||||
44 | Accepted | 20ms | 3128 KiB | ||||
45 | Accepted | 20ms | 2968 KiB | ||||
46 | Wrong answer | 16ms | 3128 KiB | ||||
47 | Wrong answer | 20ms | 3080 KiB | ||||
subtask5 | 0/15 | ||||||
48 | Wrong answer | 21ms | 3320 KiB | ||||
49 | Wrong answer | 17ms | 3760 KiB | ||||
50 | Wrong answer | 470ms | 3408 KiB | ||||
51 | Wrong answer | 17ms | 3128 KiB | ||||
52 | Wrong answer | 108ms | 3184 KiB | ||||
53 | Accepted | 17ms | 3128 KiB | ||||
54 | Accepted | 23ms | 3148 KiB | ||||
55 | Accepted | 68ms | 3172 KiB | ||||
56 | Accepted | 500ms | 3324 KiB | ||||
57 | Accepted | 17ms | 3572 KiB | ||||
58 | Accepted | 17ms | 3560 KiB | ||||
59 | Accepted | 18ms | 3508 KiB | ||||
60 | Accepted | 23ms | 3120 KiB | ||||
61 | Accepted | 21ms | 2984 KiB | ||||
62 | Accepted | 23ms | 3128 KiB | ||||
63 | Accepted | 21ms | 3208 KiB | ||||
64 | Accepted | 490ms | 3384 KiB | ||||
65 | Accepted | 497ms | 3452 KiB | ||||
66 | Accepted | 474ms | 3384 KiB |