119642024-11-22 14:50:31DoberBendeguzSzámjegycserepypy3Wrong answer 0/100442ms27652 KiB
N = int(input())
m = -1
for i in range(N):
    K = input()
    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
    print(m)
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted39ms19440 KiB
subtask20/21
2Wrong answer256ms26860 KiB
subtask30/23
3Wrong answer421ms27360 KiB
4Wrong answer439ms27428 KiB
5Wrong answer365ms24688 KiB
6Wrong answer439ms26824 KiB
7Wrong answer433ms27372 KiB
8Wrong answer391ms24812 KiB
9Wrong answer439ms27512 KiB
10Wrong answer397ms25640 KiB
11Wrong answer442ms27372 KiB
12Wrong answer441ms27368 KiB
13Wrong answer425ms27652 KiB
14Wrong answer375ms24552 KiB
15Wrong answer435ms26700 KiB
16Wrong answer389ms24428 KiB
17Wrong answer398ms25316 KiB
18Wrong answer402ms24384 KiB
19Wrong answer365ms24556 KiB
20Wrong answer384ms24672 KiB
21Wrong answer372ms24656 KiB
22Wrong answer428ms26860 KiB
23Wrong answer407ms26860 KiB
subtask40/41
24Accepted39ms19684 KiB
25Accepted43ms19652 KiB
26Accepted39ms19440 KiB
27Accepted45ms19552 KiB
28Accepted45ms19484 KiB
29Accepted41ms19444 KiB
30Accepted39ms19692 KiB
31Accepted43ms19696 KiB
32Accepted41ms19440 KiB
33Wrong answer45ms19664 KiB
34Accepted39ms19432 KiB
35Accepted54ms21268 KiB
36Accepted71ms21484 KiB
37Accepted136ms22872 KiB
38Accepted46ms21312 KiB
39Accepted54ms21296 KiB
40Accepted48ms21436 KiB
41Accepted52ms21232 KiB
42Accepted71ms21576 KiB
43Accepted79ms21484 KiB
44Accepted71ms21544 KiB
45Accepted76ms21740 KiB
46Wrong answer46ms21380 KiB
47Wrong answer71ms21680 KiB
subtask50/15
48Wrong answer74ms21536 KiB
49Wrong answer46ms21756 KiB
50Wrong answer428ms26396 KiB
51Wrong answer61ms21432 KiB
52Wrong answer171ms23344 KiB
53Accepted52ms21372 KiB
54Accepted82ms21568 KiB
55Accepted123ms23788 KiB
56Accepted312ms23020 KiB
57Accepted46ms21744 KiB
58Accepted46ms21744 KiB
59Accepted48ms21744 KiB
60Accepted78ms21484 KiB
61Accepted75ms21488 KiB
62Accepted85ms21484 KiB
63Accepted76ms21600 KiB
64Accepted307ms23020 KiB
65Accepted310ms23020 KiB
66Accepted316ms22832 KiB