118892024-11-15 15:52:46LenglZalanMorSzámjegycserepypy3Wrong answer 0/100477ms27460 KiB
N = int(input())
m = 0
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
1Accepted39ms19436 KiB
subtask20/21
2Wrong answer259ms26856 KiB
subtask30/23
3Wrong answer430ms27416 KiB
4Wrong answer442ms27296 KiB
5Wrong answer365ms24768 KiB
6Wrong answer442ms27268 KiB
7Wrong answer432ms27372 KiB
8Wrong answer388ms24812 KiB
9Wrong answer439ms27208 KiB
10Wrong answer402ms25780 KiB
11Wrong answer437ms27372 KiB
12Wrong answer433ms27316 KiB
13Wrong answer428ms27460 KiB
14Wrong answer375ms24552 KiB
15Wrong answer442ms26528 KiB
16Wrong answer386ms24716 KiB
17Wrong answer402ms25180 KiB
18Wrong answer395ms24528 KiB
19Wrong answer370ms24560 KiB
20Wrong answer368ms24600 KiB
21Wrong answer377ms24680 KiB
22Wrong answer435ms26860 KiB
23Wrong answer414ms26900 KiB
subtask40/41
24Accepted41ms19648 KiB
25Accepted46ms19584 KiB
26Accepted41ms19644 KiB
27Accepted43ms19632 KiB
28Accepted41ms19672 KiB
29Accepted45ms19528 KiB
30Accepted41ms19600 KiB
31Accepted46ms19696 KiB
32Accepted46ms19592 KiB
33Wrong answer45ms19640 KiB
34Accepted39ms19476 KiB
35Accepted48ms21296 KiB
36Accepted79ms21484 KiB
37Accepted123ms22748 KiB
38Accepted48ms21312 KiB
39Accepted48ms21224 KiB
40Accepted48ms21224 KiB
41Accepted48ms21324 KiB
42Accepted78ms21488 KiB
43Accepted71ms21480 KiB
44Accepted76ms21492 KiB
45Accepted71ms21676 KiB
46Wrong answer54ms21408 KiB
47Wrong answer70ms21684 KiB
subtask50/15
48Wrong answer74ms21484 KiB
49Wrong answer48ms22104 KiB
50Wrong answer477ms26436 KiB
51Wrong answer61ms21452 KiB
52Wrong answer172ms23276 KiB
53Accepted59ms21484 KiB
54Accepted75ms21652 KiB
55Accepted134ms23640 KiB
56Accepted331ms23020 KiB
57Accepted46ms21744 KiB
58Accepted48ms21744 KiB
59Accepted54ms21560 KiB
60Accepted75ms21480 KiB
61Accepted82ms21508 KiB
62Accepted86ms21484 KiB
63Accepted90ms21704 KiB
64Accepted305ms22920 KiB
65Accepted312ms23040 KiB
66Accepted312ms22880 KiB