119682024-11-22 14:54:23XetoxinoSzámjegycserepypy3Wrong answer 0/100481ms27076 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
1Accepted39ms19440 KiB
subtask20/21
2Wrong answer250ms26504 KiB
subtask30/23
3Wrong answer425ms26832 KiB
4Wrong answer451ms26912 KiB
5Wrong answer377ms24712 KiB
6Wrong answer439ms26892 KiB
7Wrong answer449ms26860 KiB
8Wrong answer393ms24664 KiB
9Wrong answer433ms26832 KiB
10Wrong answer411ms25608 KiB
11Wrong answer439ms26852 KiB
12Wrong answer481ms26908 KiB
13Wrong answer439ms27076 KiB
14Wrong answer370ms24552 KiB
15Wrong answer432ms26604 KiB
16Wrong answer386ms24832 KiB
17Wrong answer409ms24848 KiB
18Wrong answer404ms24812 KiB
19Wrong answer358ms24552 KiB
20Wrong answer360ms24592 KiB
21Wrong answer375ms24712 KiB
22Wrong answer426ms26092 KiB
23Wrong answer407ms26060 KiB
subtask40/41
24Accepted45ms19624 KiB
25Accepted45ms19772 KiB
26Accepted39ms19696 KiB
27Accepted41ms19672 KiB
28Accepted45ms19696 KiB
29Accepted41ms19808 KiB
30Accepted39ms19580 KiB
31Accepted43ms19500 KiB
32Accepted41ms19632 KiB
33Wrong answer41ms19668 KiB
34Accepted43ms19544 KiB
35Accepted54ms21468 KiB
36Accepted78ms21484 KiB
37Accepted101ms23020 KiB
38Accepted48ms21316 KiB
39Accepted48ms21276 KiB
40Accepted54ms21224 KiB
41Accepted48ms21460 KiB
42Accepted79ms21480 KiB
43Accepted71ms21536 KiB
44Accepted78ms21664 KiB
45Accepted71ms21672 KiB
46Wrong answer54ms21232 KiB
47Wrong answer71ms21880 KiB
subtask50/15
48Wrong answer74ms21476 KiB
49Wrong answer46ms21692 KiB
50Wrong answer432ms27072 KiB
51Wrong answer63ms21588 KiB
52Wrong answer199ms23280 KiB
53Accepted52ms21392 KiB
54Accepted75ms21484 KiB
55Accepted125ms23788 KiB
56Accepted328ms23020 KiB
57Accepted52ms21744 KiB
58Accepted48ms21740 KiB
59Accepted54ms21748 KiB
60Accepted76ms21496 KiB
61Accepted85ms21484 KiB
62Accepted86ms21616 KiB
63Accepted76ms21484 KiB
64Accepted324ms23016 KiB
65Accepted328ms23020 KiB
66Accepted324ms23020 KiB