111842024-07-15 18:47:03probaLegnagyobb téglalappython3Wrong answer 90/100150ms15036 KiB
N = input()
sor = [int(i) for i in input().split(' ')]

sor.sort(reverse=True)
h = len(sor)
i, a, b, ok = 0, None, None, True

  
while i < h-3 and h > 3:
    
    if sor[i] == sor[i+1] and a == None:
        a = sor[i]
        i += 1
        
    elif sor[i] == sor[i+1] and b == None:
        print(a*sor[i])
        ok = False
        break
    i += 1

if ok:
    print(0)

    
        
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted18ms3044 KiB
2Accepted17ms2916 KiB
3Wrong answer17ms3044 KiB
subtask20/10
4Wrong answer17ms3048 KiB
5Wrong answer18ms3196 KiB
6Accepted17ms3072 KiB
7Accepted17ms2984 KiB
8Accepted17ms3064 KiB
subtask310/10
9Accepted17ms3044 KiB
10Accepted17ms2984 KiB
11Accepted17ms3052 KiB
12Accepted17ms3044 KiB
13Accepted41ms5064 KiB
14Accepted50ms4880 KiB
subtask415/15
15Accepted17ms3044 KiB
16Accepted18ms3044 KiB
17Accepted17ms2952 KiB
18Accepted17ms3044 KiB
19Accepted17ms2944 KiB
20Accepted17ms2916 KiB
21Accepted17ms2916 KiB
22Accepted17ms3064 KiB
23Accepted17ms2844 KiB
24Accepted17ms3044 KiB
subtask520/20
25Accepted18ms3172 KiB
26Accepted20ms3484 KiB
27Accepted25ms3576 KiB
28Accepted23ms3556 KiB
29Accepted23ms3556 KiB
30Accepted21ms3556 KiB
31Accepted21ms3556 KiB
32Accepted19ms3556 KiB
subtask615/15
33Accepted18ms2956 KiB
34Accepted57ms14664 KiB
35Accepted119ms14764 KiB
36Accepted115ms14692 KiB
37Accepted92ms14600 KiB
38Accepted64ms14700 KiB
39Accepted54ms14704 KiB
40Accepted21ms4016 KiB
41Accepted59ms14772 KiB
subtask730/30
42Accepted78ms14280 KiB
43Accepted86ms14736 KiB
44Accepted150ms14704 KiB
45Accepted93ms14848 KiB
46Accepted90ms14704 KiB
47Accepted100ms14704 KiB
48Accepted86ms14704 KiB
49Accepted149ms14704 KiB
50Accepted86ms14624 KiB
51Accepted85ms15036 KiB