11095 | 2024-07-06 22:39:45 | proba | Számjegycsere | python3 | Wrong answer 0/100 | 280ms | 7888 KiB |
# 50, 00, 25, 75
lista = [int(input()) for i in range(int(input()))]
#lista = [157, 1001, 152, 7500, 7005, 2235, 52, 22, 10011]
for i in lista:
s = str(i)
# osztható 25-tel
if i % 25 == 0:
print(0)
else:
tovabb = True
# van benne 5-ös továbbá 2 vagy 7-es
if '5' in s and ('2' in s or '7' in s):
if s[-1]=='5' or (s[-2:]=='57' or s[-2:]=='52') :
print(1)
tovabb = False
else:
print(2)
tovabb = False
# van benne 5-ös és 0
if tovabb and '0' in s and '5' in s:
if s[-1] == '5' and s[-2]=='0':
print(1)
tovabb = False
else:
print(2)
tovabb = False
# ha van benne 2 nulla
if tovabb and s.count('0')>1:
if s[-1]=='0' or s[-2]=='0':
print(1)
tovabb = False
else:
print(2)
tovabb = False
if tovabb:
print(-1)
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 17ms | 3044 KiB | ||||
subtask2 | 0/21 | ||||||
2 | Wrong answer | 101ms | 4716 KiB | ||||
subtask3 | 0/23 | ||||||
3 | Wrong answer | 256ms | 7620 KiB | ||||
4 | Wrong answer | 259ms | 7620 KiB | ||||
5 | Wrong answer | 266ms | 7620 KiB | ||||
6 | Wrong answer | 261ms | 7548 KiB | ||||
7 | Wrong answer | 263ms | 7620 KiB | ||||
8 | Wrong answer | 266ms | 7772 KiB | ||||
9 | Wrong answer | 257ms | 7684 KiB | ||||
10 | Wrong answer | 256ms | 7656 KiB | ||||
11 | Wrong answer | 259ms | 7684 KiB | ||||
12 | Wrong answer | 259ms | 7656 KiB | ||||
13 | Wrong answer | 264ms | 7684 KiB | ||||
14 | Wrong answer | 263ms | 7608 KiB | ||||
15 | Wrong answer | 261ms | 7536 KiB | ||||
16 | Wrong answer | 268ms | 7800 KiB | ||||
17 | Wrong answer | 263ms | 7888 KiB | ||||
18 | Wrong answer | 263ms | 7624 KiB | ||||
19 | Wrong answer | 273ms | 7624 KiB | ||||
20 | Wrong answer | 266ms | 7624 KiB | ||||
21 | Wrong answer | 259ms | 7600 KiB | ||||
22 | Wrong answer | 264ms | 7692 KiB | ||||
23 | Wrong answer | 261ms | 7620 KiB | ||||
subtask4 | 0/41 | ||||||
24 | Accepted | 18ms | 3244 KiB | ||||
25 | Accepted | 18ms | 3080 KiB | ||||
26 | Accepted | 18ms | 3044 KiB | ||||
27 | Accepted | 18ms | 3180 KiB | ||||
28 | Accepted | 18ms | 3044 KiB | ||||
29 | Accepted | 18ms | 3044 KiB | ||||
30 | Accepted | 18ms | 3088 KiB | ||||
31 | Accepted | 17ms | 3172 KiB | ||||
32 | Accepted | 18ms | 3044 KiB | ||||
33 | Wrong answer | 18ms | 3060 KiB | ||||
34 | Accepted | 17ms | 2920 KiB | ||||
35 | Accepted | 17ms | 3044 KiB | ||||
36 | Accepted | 19ms | 3100 KiB | ||||
37 | Accepted | 43ms | 3416 KiB | ||||
38 | Accepted | 18ms | 3324 KiB | ||||
39 | Accepted | 17ms | 3032 KiB | ||||
40 | Accepted | 17ms | 2916 KiB | ||||
41 | Accepted | 17ms | 3088 KiB | ||||
42 | Accepted | 19ms | 3228 KiB | ||||
43 | Accepted | 19ms | 3172 KiB | ||||
44 | Accepted | 21ms | 3056 KiB | ||||
45 | Accepted | 20ms | 3228 KiB | ||||
46 | Wrong answer | 17ms | 3064 KiB | ||||
47 | Wrong answer | 20ms | 3044 KiB | ||||
subtask5 | 0/15 | ||||||
48 | Wrong answer | 57ms | 3460 KiB | ||||
49 | Runtime error | 18ms | 3256 KiB | ||||
50 | Wrong answer | 280ms | 7616 KiB | ||||
51 | Runtime error | 17ms | 2988 KiB | ||||
52 | Wrong answer | 82ms | 4828 KiB | ||||
53 | Runtime error | 18ms | 3044 KiB | ||||
54 | Accepted | 57ms | 3684 KiB | ||||
55 | Accepted | 54ms | 4088 KiB | ||||
56 | Accepted | 261ms | 7444 KiB | ||||
57 | Runtime error | 18ms | 3428 KiB | ||||
58 | Runtime error | 18ms | 3300 KiB | ||||
59 | Runtime error | 17ms | 3320 KiB | ||||
60 | Accepted | 56ms | 3684 KiB | ||||
61 | Accepted | 57ms | 3684 KiB | ||||
62 | Accepted | 57ms | 3700 KiB | ||||
63 | Accepted | 57ms | 3596 KiB | ||||
64 | Accepted | 263ms | 7624 KiB | ||||
65 | Accepted | 264ms | 7624 KiB | ||||
66 | Accepted | 259ms | 7624 KiB |