119592024-11-22 14:41:02XetoxinoSzámjegycserepypy3Wrong answer 0/100458ms27516 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
1Wrong answer46ms19436 KiB
subtask20/21
2Wrong answer266ms26348 KiB
subtask30/23
3Wrong answer458ms26936 KiB
4Wrong answer446ms27432 KiB
5Wrong answer368ms24616 KiB
6Wrong answer437ms27004 KiB
7Wrong answer441ms27372 KiB
8Wrong answer391ms24784 KiB
9Wrong answer437ms26844 KiB
10Wrong answer407ms25716 KiB
11Wrong answer449ms26920 KiB
12Wrong answer437ms27372 KiB
13Wrong answer432ms27516 KiB
14Wrong answer370ms24636 KiB
15Wrong answer439ms26604 KiB
16Wrong answer386ms24908 KiB
17Wrong answer400ms24752 KiB
18Wrong answer402ms24756 KiB
19Wrong answer368ms24556 KiB
20Wrong answer365ms24512 KiB
21Wrong answer372ms24512 KiB
22Wrong answer423ms26348 KiB
23Wrong answer414ms26600 KiB
subtask40/41
24Accepted43ms19664 KiB
25Accepted46ms19520 KiB
26Accepted41ms19656 KiB
27Accepted41ms19668 KiB
28Accepted41ms19556 KiB
29Accepted39ms19672 KiB
30Accepted43ms19508 KiB
31Accepted45ms19524 KiB
32Accepted41ms19572 KiB
33Wrong answer45ms19692 KiB
34Accepted39ms19500 KiB
35Accepted54ms21232 KiB
36Accepted78ms21500 KiB
37Accepted103ms23004 KiB
38Accepted46ms21268 KiB
39Accepted52ms21232 KiB
40Accepted56ms21232 KiB
41Accepted52ms21228 KiB
42Accepted71ms21656 KiB
43Accepted71ms21484 KiB
44Accepted78ms21452 KiB
45Accepted78ms21456 KiB
46Wrong answer48ms21232 KiB
47Wrong answer78ms21500 KiB
subtask50/15
48Wrong answer75ms21724 KiB
49Wrong answer46ms21996 KiB
50Wrong answer430ms27068 KiB
51Wrong answer59ms21564 KiB
52Wrong answer177ms23532 KiB
53Accepted52ms21384 KiB
54Accepted85ms21484 KiB
55Accepted125ms23788 KiB
56Accepted312ms23016 KiB
57Accepted45ms21660 KiB
58Accepted48ms21756 KiB
59Accepted46ms21724 KiB
60Accepted76ms21724 KiB
61Accepted75ms21456 KiB
62Accepted83ms21484 KiB
63Accepted76ms21480 KiB
64Accepted303ms23000 KiB
65Accepted324ms22992 KiB
66Accepted316ms22880 KiB