111832024-07-15 18:45:30probaLegnagyobb téglalappython3Wrong answer 90/100145ms15180 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:
    
    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
1Accepted18ms2920 KiB
2Accepted17ms3044 KiB
3Wrong answer17ms2916 KiB
subtask20/10
4Wrong answer18ms3044 KiB
5Wrong answer17ms2952 KiB
6Accepted17ms3064 KiB
7Accepted17ms2916 KiB
8Accepted17ms2924 KiB
subtask310/10
9Accepted17ms3044 KiB
10Accepted18ms2988 KiB
11Accepted17ms2936 KiB
12Accepted17ms3064 KiB
13Accepted41ms4752 KiB
14Accepted46ms4900 KiB
subtask415/15
15Accepted17ms3076 KiB
16Accepted17ms3180 KiB
17Accepted17ms3044 KiB
18Accepted18ms2900 KiB
19Accepted17ms3044 KiB
20Accepted17ms3044 KiB
21Accepted17ms3044 KiB
22Accepted17ms3044 KiB
23Accepted17ms2816 KiB
24Accepted17ms3064 KiB
subtask520/20
25Accepted17ms3172 KiB
26Accepted21ms3704 KiB
27Accepted24ms3556 KiB
28Accepted23ms3624 KiB
29Accepted24ms3484 KiB
30Accepted21ms3492 KiB
31Accepted21ms3612 KiB
32Accepted19ms3576 KiB
subtask615/15
33Accepted18ms3012 KiB
34Accepted59ms14752 KiB
35Accepted114ms14840 KiB
36Accepted108ms14524 KiB
37Accepted86ms14700 KiB
38Accepted65ms14748 KiB
39Accepted56ms14700 KiB
40Accepted21ms4344 KiB
41Accepted57ms14624 KiB
subtask730/30
42Accepted76ms14232 KiB
43Accepted82ms14840 KiB
44Accepted145ms14748 KiB
45Accepted97ms14744 KiB
46Accepted94ms14700 KiB
47Accepted96ms14700 KiB
48Accepted83ms14852 KiB
49Accepted142ms14748 KiB
50Accepted86ms14772 KiB
51Accepted86ms15180 KiB