11886 | 2024-11-15 15:30:34 | matthias | Számjegycsere | python3 | Wrong answer 0/100 | 17ms | 3568 KiB |
N = input()
v = -1
nullas = N.count('0')
if len(N) >= 2:
if N[-2:] in ['00','25', '50', '75']:
v = 0
elif N[-2:] in ['52', '05', '57']:
v = 1
elif N[-1] == '5' and (('2' in N) or ('7' in N)):
v = 1
elif N[-1] == '0' and (('5' in N) or nullas >= 2):
v = 1
elif N[-2] in '72' and '5' in N:
v = 1
elif N[-2] == '5' and '0' in N:
v = 1
elif N[-2] == '0' and nullas >= 2:
v = 1
elif ('5' in N) and (('2' in N) or ('7' in N) or ('0' in N)):
v = 2
elif nullas >= 2:
v = 2
print(v)
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Wrong answer | 14ms | 3004 KiB | ||||
subtask2 | 0/21 | ||||||
2 | Wrong answer | 14ms | 3048 KiB | ||||
subtask3 | 0/23 | ||||||
3 | Wrong answer | 16ms | 3128 KiB | ||||
4 | Wrong answer | 16ms | 3128 KiB | ||||
5 | Wrong answer | 16ms | 3128 KiB | ||||
6 | Wrong answer | 16ms | 3128 KiB | ||||
7 | Wrong answer | 14ms | 3128 KiB | ||||
8 | Wrong answer | 16ms | 3128 KiB | ||||
9 | Wrong answer | 14ms | 3068 KiB | ||||
10 | Wrong answer | 16ms | 3136 KiB | ||||
11 | Wrong answer | 16ms | 2956 KiB | ||||
12 | Wrong answer | 16ms | 3116 KiB | ||||
13 | Wrong answer | 16ms | 3152 KiB | ||||
14 | Wrong answer | 16ms | 2976 KiB | ||||
15 | Wrong answer | 16ms | 3180 KiB | ||||
16 | Wrong answer | 16ms | 3124 KiB | ||||
17 | Wrong answer | 16ms | 3128 KiB | ||||
18 | Wrong answer | 16ms | 3128 KiB | ||||
19 | Wrong answer | 16ms | 3128 KiB | ||||
20 | Wrong answer | 17ms | 3132 KiB | ||||
21 | Wrong answer | 14ms | 3072 KiB | ||||
22 | Wrong answer | 14ms | 3096 KiB | ||||
23 | Wrong answer | 16ms | 3320 KiB | ||||
subtask4 | 0/41 | ||||||
24 | Wrong answer | 16ms | 3152 KiB | ||||
25 | Wrong answer | 16ms | 3128 KiB | ||||
26 | Wrong answer | 16ms | 2948 KiB | ||||
27 | Wrong answer | 16ms | 2960 KiB | ||||
28 | Wrong answer | 16ms | 3128 KiB | ||||
29 | Wrong answer | 16ms | 3044 KiB | ||||
30 | Wrong answer | 16ms | 3136 KiB | ||||
31 | Wrong answer | 16ms | 3308 KiB | ||||
32 | Wrong answer | 16ms | 3252 KiB | ||||
33 | Wrong answer | 16ms | 3008 KiB | ||||
34 | Wrong answer | 16ms | 2960 KiB | ||||
35 | Wrong answer | 17ms | 3124 KiB | ||||
36 | Wrong answer | 14ms | 3088 KiB | ||||
37 | Wrong answer | 16ms | 3028 KiB | ||||
38 | Wrong answer | 16ms | 2972 KiB | ||||
39 | Wrong answer | 16ms | 3092 KiB | ||||
40 | Wrong answer | 16ms | 3400 KiB | ||||
41 | Wrong answer | 17ms | 3568 KiB | ||||
42 | Wrong answer | 16ms | 3128 KiB | ||||
43 | Wrong answer | 16ms | 3116 KiB | ||||
44 | Wrong answer | 17ms | 2992 KiB | ||||
45 | Wrong answer | 16ms | 2952 KiB | ||||
46 | Wrong answer | 14ms | 3172 KiB | ||||
47 | Wrong answer | 14ms | 3064 KiB | ||||
subtask5 | 0/15 | ||||||
48 | Wrong answer | 16ms | 3316 KiB | ||||
49 | Wrong answer | 16ms | 3124 KiB | ||||
50 | Wrong answer | 16ms | 3128 KiB | ||||
51 | Wrong answer | 16ms | 3100 KiB | ||||
52 | Wrong answer | 16ms | 3020 KiB | ||||
53 | Wrong answer | 16ms | 3164 KiB | ||||
54 | Wrong answer | 16ms | 3024 KiB | ||||
55 | Wrong answer | 16ms | 3016 KiB | ||||
56 | Wrong answer | 17ms | 3128 KiB | ||||
57 | Wrong answer | 16ms | 2988 KiB | ||||
58 | Wrong answer | 14ms | 3128 KiB | ||||
59 | Wrong answer | 16ms | 2960 KiB | ||||
60 | Wrong answer | 16ms | 3144 KiB | ||||
61 | Wrong answer | 16ms | 3112 KiB | ||||
62 | Wrong answer | 16ms | 3164 KiB | ||||
63 | Wrong answer | 14ms | 2992 KiB | ||||
64 | Wrong answer | 16ms | 3128 KiB | ||||
65 | Wrong answer | 17ms | 3316 KiB | ||||
66 | Wrong answer | 16ms | 2960 KiB |