119602024-11-22 14:47:30XetoxinoSzámjegycserepypy3Wrong answer 0/100472ms27244 KiB
N = int(input())
m = 0
for i in range(N):
    K = input()
    if len(K) >= 2:
        if K[-2:] in ['00','25','50','75']:
            m = 0
        elif K[-2:] in ['52','05','57']:
            m = 1
        elif K[-1] == '5' and ('2' in K or '7' in K[:-1]):
            m = 1
        elif K[-1] == '0' and ('5' in K or '0' in K[:-1]):
            m = 1
        elif '2' in K and '5' in K:
            m = 2
        elif '5' in K and '7' in K:
            m = 2
        elif K.count('0') > 1:
            m = 2
        elif '5' in K and '0' in K:
            m = 2
        else:
            m = -1
    else:
        m = -1
    print(m)
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted46ms19440 KiB
subtask20/21
2Wrong answer259ms26436 KiB
subtask30/23
3Wrong answer430ms26756 KiB
4Wrong answer435ms26856 KiB
5Wrong answer368ms24544 KiB
6Wrong answer441ms27028 KiB
7Wrong answer428ms26864 KiB
8Wrong answer388ms24772 KiB
9Wrong answer472ms27244 KiB
10Wrong answer404ms25700 KiB
11Wrong answer428ms26856 KiB
12Wrong answer430ms26872 KiB
13Wrong answer425ms27116 KiB
14Wrong answer375ms24608 KiB
15Wrong answer437ms26600 KiB
16Wrong answer388ms25028 KiB
17Wrong answer400ms24828 KiB
18Wrong answer402ms24916 KiB
19Wrong answer363ms24552 KiB
20Wrong answer374ms24556 KiB
21Wrong answer370ms24548 KiB
22Wrong answer432ms26148 KiB
23Wrong answer411ms26608 KiB
subtask40/41
24Accepted46ms19696 KiB
25Accepted43ms19876 KiB
26Accepted41ms19684 KiB
27Accepted39ms19636 KiB
28Accepted46ms19688 KiB
29Accepted41ms19652 KiB
30Accepted39ms19496 KiB
31Accepted45ms19588 KiB
32Accepted41ms19864 KiB
33Wrong answer46ms19700 KiB
34Accepted39ms19660 KiB
35Accepted54ms21324 KiB
36Accepted71ms21572 KiB
37Accepted101ms23008 KiB
38Accepted54ms21420 KiB
39Accepted54ms21460 KiB
40Accepted48ms21268 KiB
41Accepted56ms21428 KiB
42Accepted79ms21544 KiB
43Accepted71ms21476 KiB
44Accepted89ms21564 KiB
45Accepted71ms21488 KiB
46Wrong answer54ms21332 KiB
47Wrong answer71ms21484 KiB
subtask50/15
48Wrong answer75ms21468 KiB
49Wrong answer54ms21572 KiB
50Wrong answer432ms27084 KiB
51Wrong answer59ms21624 KiB
52Wrong answer172ms23272 KiB
53Accepted52ms21376 KiB
54Accepted82ms21476 KiB
55Accepted125ms23700 KiB
56Accepted314ms23028 KiB
57Accepted46ms21744 KiB
58Accepted48ms21744 KiB
59Accepted48ms21744 KiB
60Accepted76ms21484 KiB
61Accepted75ms21516 KiB
62Accepted79ms21764 KiB
63Accepted75ms21488 KiB
64Accepted310ms23020 KiB
65Accepted321ms23020 KiB
66Accepted319ms23012 KiB