11089 | 2024-07-06 21:59:14 | proba | Számjegycsere | python3 | Wrong answer 0/100 | 354ms | 7764 KiB |
# 50, 00, 25, 75
lista = [int(input()) for i in range(int(input()))]
for i in lista:
ok = False
if i % 25 == 0:
print(0)
ok = True
if not ok and '5' in str(i) and ('2' in str(i) or '7' in str(i)):
if str(i)[-1]=='5' or str(i)[-2]=='2' or str(i)[-2]=='7':
print(1)
ok = True
else:
print(2)
ok = True
if not ok and '0' in str(i) and '5' in str(i):
if str(i)[-1] == '0' or str(i)[-2]=='5':
print(1)
ok = True
else:
print(2)
ok = True
if not ok and str(i).count('0')>1:
if str(i)[-1]=='0' or str(i)[-2]=='0':
print(1)
ok = True
else:
print(2)
ok = True
if not ok:
print(-1)
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 17ms | 3044 KiB | ||||
subtask2 | 0/21 | ||||||
2 | Wrong answer | 123ms | 4940 KiB | ||||
subtask3 | 0/23 | ||||||
3 | Wrong answer | 312ms | 7636 KiB | ||||
4 | Wrong answer | 319ms | 7636 KiB | ||||
5 | Wrong answer | 308ms | 7680 KiB | ||||
6 | Wrong answer | 326ms | 7636 KiB | ||||
7 | Wrong answer | 319ms | 7764 KiB | ||||
8 | Wrong answer | 342ms | 7700 KiB | ||||
9 | Wrong answer | 317ms | 7636 KiB | ||||
10 | Wrong answer | 314ms | 7656 KiB | ||||
11 | Wrong answer | 317ms | 7636 KiB | ||||
12 | Wrong answer | 319ms | 7700 KiB | ||||
13 | Wrong answer | 354ms | 7640 KiB | ||||
14 | Wrong answer | 312ms | 7640 KiB | ||||
15 | Wrong answer | 323ms | 7640 KiB | ||||
16 | Wrong answer | 342ms | 7500 KiB | ||||
17 | Wrong answer | 321ms | 7696 KiB | ||||
18 | Wrong answer | 324ms | 7716 KiB | ||||
19 | Wrong answer | 337ms | 7632 KiB | ||||
20 | Wrong answer | 335ms | 7740 KiB | ||||
21 | Wrong answer | 312ms | 7760 KiB | ||||
22 | Wrong answer | 323ms | 7696 KiB | ||||
23 | Wrong answer | 317ms | 7632 KiB | ||||
subtask4 | 0/41 | ||||||
24 | Accepted | 18ms | 3044 KiB | ||||
25 | Accepted | 18ms | 3044 KiB | ||||
26 | Accepted | 18ms | 3124 KiB | ||||
27 | Accepted | 18ms | 3180 KiB | ||||
28 | Accepted | 19ms | 3116 KiB | ||||
29 | Accepted | 19ms | 3104 KiB | ||||
30 | Accepted | 18ms | 3172 KiB | ||||
31 | Accepted | 19ms | 3216 KiB | ||||
32 | Accepted | 18ms | 2992 KiB | ||||
33 | Wrong answer | 18ms | 3108 KiB | ||||
34 | Accepted | 19ms | 3044 KiB | ||||
35 | Accepted | 18ms | 3172 KiB | ||||
36 | Accepted | 21ms | 3120 KiB | ||||
37 | Accepted | 46ms | 3428 KiB | ||||
38 | Accepted | 18ms | 3180 KiB | ||||
39 | Accepted | 17ms | 3044 KiB | ||||
40 | Accepted | 18ms | 3092 KiB | ||||
41 | Accepted | 18ms | 3044 KiB | ||||
42 | Accepted | 20ms | 3216 KiB | ||||
43 | Accepted | 21ms | 3176 KiB | ||||
44 | Accepted | 20ms | 3356 KiB | ||||
45 | Accepted | 21ms | 3340 KiB | ||||
46 | Wrong answer | 18ms | 3088 KiB | ||||
47 | Wrong answer | 20ms | 3172 KiB | ||||
subtask5 | 0/15 | ||||||
48 | Wrong answer | 133ms | 3660 KiB | ||||
49 | Runtime error | 19ms | 3300 KiB | ||||
50 | Wrong answer | 351ms | 7500 KiB | ||||
51 | Runtime error | 17ms | 3044 KiB | ||||
52 | Wrong answer | 107ms | 4688 KiB | ||||
53 | Runtime error | 17ms | 3044 KiB | ||||
54 | Accepted | 105ms | 3728 KiB | ||||
55 | Accepted | 67ms | 4196 KiB | ||||
56 | Accepted | 307ms | 7592 KiB | ||||
57 | Runtime error | 17ms | 3344 KiB | ||||
58 | Runtime error | 17ms | 3300 KiB | ||||
59 | Runtime error | 18ms | 3300 KiB | ||||
60 | Accepted | 101ms | 3684 KiB | ||||
61 | Accepted | 101ms | 3668 KiB | ||||
62 | Accepted | 144ms | 3728 KiB | ||||
63 | Accepted | 101ms | 3728 KiB | ||||
64 | Accepted | 305ms | 7676 KiB | ||||
65 | Accepted | 303ms | 7612 KiB | ||||
66 | Accepted | 305ms | 7656 KiB |