11091 | 2024-07-06 22:11:44 | proba | Számjegycsere | python3 | Wrong answer 0/100 | 342ms | 7844 KiB |
# 50, 00, 25, 75
lista = [int(input()) for i in range(int(input()))]
for i in lista:
tovabb = True
# osztható 25-tel
if i % 25 == 0:
print(0)
tovabb = False
# van benne 5-ös továbbá 2 vagy 7-es
if tovabb and '5' in str(i) and ('2' in str(i) or '7' in str(i)):
if str(i)[-1]=='5':
print(1)
tovabb = False
else:
if str(i)[-2]=='5' and (str(i)[-1]=='2' or str(i)[-1]=='7'):
print(1)
tovabb = False
else:
print(2)
tovabb = False
# van benne 5-ös és 0
if tovabb and '0' in str(i) and '5' in str(i):
if str(i)[-2] == '5' or str(i)[-1]=='0':
print(1)
tovabb = False
else:
if str(i)[-1] == '5' or str(i)[-2]=='0':
print(1)
tovabb = False
else:
print(2)
tovabb = False
# ha van benne 2 nulla
if tovabb and str(i).count('0')>1:
if str(i)[-1]=='0' or str(i)[-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 | 123ms | 4976 KiB | ||||
subtask3 | 0/23 | ||||||
3 | Wrong answer | 310ms | 7652 KiB | ||||
4 | Wrong answer | 321ms | 7644 KiB | ||||
5 | Wrong answer | 305ms | 7772 KiB | ||||
6 | Wrong answer | 319ms | 7708 KiB | ||||
7 | Wrong answer | 324ms | 7644 KiB | ||||
8 | Wrong answer | 337ms | 7644 KiB | ||||
9 | Wrong answer | 319ms | 7644 KiB | ||||
10 | Wrong answer | 310ms | 7688 KiB | ||||
11 | Wrong answer | 319ms | 7644 KiB | ||||
12 | Wrong answer | 319ms | 7824 KiB | ||||
13 | Wrong answer | 342ms | 7644 KiB | ||||
14 | Wrong answer | 303ms | 7780 KiB | ||||
15 | Wrong answer | 319ms | 7772 KiB | ||||
16 | Wrong answer | 337ms | 7680 KiB | ||||
17 | Wrong answer | 323ms | 7652 KiB | ||||
18 | Wrong answer | 312ms | 7828 KiB | ||||
19 | Wrong answer | 337ms | 7712 KiB | ||||
20 | Wrong answer | 328ms | 7648 KiB | ||||
21 | Wrong answer | 310ms | 7844 KiB | ||||
22 | Wrong answer | 324ms | 7696 KiB | ||||
23 | Wrong answer | 324ms | 7648 KiB | ||||
subtask4 | 0/41 | ||||||
24 | Accepted | 19ms | 3044 KiB | ||||
25 | Accepted | 18ms | 3064 KiB | ||||
26 | Accepted | 18ms | 3084 KiB | ||||
27 | Accepted | 18ms | 3320 KiB | ||||
28 | Accepted | 19ms | 3044 KiB | ||||
29 | Accepted | 18ms | 3196 KiB | ||||
30 | Accepted | 18ms | 3196 KiB | ||||
31 | Accepted | 19ms | 3044 KiB | ||||
32 | Accepted | 19ms | 3044 KiB | ||||
33 | Wrong answer | 19ms | 3088 KiB | ||||
34 | Accepted | 19ms | 3192 KiB | ||||
35 | Accepted | 18ms | 3044 KiB | ||||
36 | Accepted | 21ms | 3216 KiB | ||||
37 | Accepted | 45ms | 3432 KiB | ||||
38 | Accepted | 18ms | 3084 KiB | ||||
39 | Accepted | 18ms | 3064 KiB | ||||
40 | Accepted | 17ms | 3064 KiB | ||||
41 | Accepted | 18ms | 3044 KiB | ||||
42 | Accepted | 21ms | 3460 KiB | ||||
43 | Accepted | 21ms | 3044 KiB | ||||
44 | Accepted | 20ms | 3192 KiB | ||||
45 | Accepted | 20ms | 3236 KiB | ||||
46 | Wrong answer | 18ms | 3044 KiB | ||||
47 | Wrong answer | 20ms | 3216 KiB | ||||
subtask5 | 0/15 | ||||||
48 | Wrong answer | 119ms | 3756 KiB | ||||
49 | Runtime error | 18ms | 3364 KiB | ||||
50 | Wrong answer | 342ms | 7652 KiB | ||||
51 | Runtime error | 17ms | 3196 KiB | ||||
52 | Wrong answer | 103ms | 4580 KiB | ||||
53 | Runtime error | 18ms | 3320 KiB | ||||
54 | Accepted | 104ms | 3684 KiB | ||||
55 | Accepted | 65ms | 4196 KiB | ||||
56 | Accepted | 317ms | 7696 KiB | ||||
57 | Runtime error | 17ms | 3300 KiB | ||||
58 | Runtime error | 17ms | 3344 KiB | ||||
59 | Runtime error | 18ms | 3452 KiB | ||||
60 | Accepted | 100ms | 3684 KiB | ||||
61 | Accepted | 100ms | 3684 KiB | ||||
62 | Accepted | 143ms | 3680 KiB | ||||
63 | Accepted | 100ms | 3684 KiB | ||||
64 | Accepted | 310ms | 7676 KiB | ||||
65 | Accepted | 307ms | 7612 KiB | ||||
66 | Accepted | 307ms | 7664 KiB |