111782024-07-15 16:29:52probaLegnagyobb téglalappython3Wrong answer 0/1001.098s14848 KiB
N = int(input())
sor = [int(i) for i in input().split(' ')]
sor.sort(reverse=True)
print(sor)
i = 0
a, b = 0, 0
while i < len(sor):
    if sor.count(sor[i]) > 3:
        print(sor[i]**2)
        break
    
    elif sor.count(sor[i]) > 1:
        if a == 0:
            a = sor[i]
        elif b == 0:
            b = sor[i]
            break
        while i < len(sor) and sor[i] == a:
            i += 1
    else:
        i += 1
    
if a*b != 0:
    print(a*b)
else:
    print(0)
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Wrong answer17ms2964 KiB
2Wrong answer17ms3228 KiB
3Wrong answer18ms2968 KiB
subtask20/10
4Wrong answer18ms3108 KiB
5Wrong answer17ms3056 KiB
6Wrong answer17ms3180 KiB
7Wrong answer17ms3072 KiB
8Wrong answer17ms3064 KiB
subtask30/10
9Wrong answer17ms3048 KiB
10Wrong answer18ms3060 KiB
11Wrong answer17ms3044 KiB
12Wrong answer17ms3044 KiB
13Wrong answer50ms4880 KiB
14Wrong answer56ms4880 KiB
subtask40/15
15Wrong answer17ms2984 KiB
16Wrong answer18ms3108 KiB
17Wrong answer17ms3044 KiB
18Wrong answer18ms3108 KiB
19Wrong answer17ms3088 KiB
20Wrong answer18ms3044 KiB
21Wrong answer18ms2916 KiB
22Wrong answer17ms3064 KiB
23Wrong answer17ms3064 KiB
24Wrong answer17ms3084 KiB
subtask50/20
25Wrong answer19ms3172 KiB
26Wrong answer140ms3764 KiB
27Time limit exceeded1.026s3632 KiB
28Wrong answer495ms3684 KiB
29Time limit exceeded1.008s3724 KiB
30Wrong answer164ms3684 KiB
31Wrong answer456ms3728 KiB
32Wrong answer19ms3620 KiB
subtask60/15
33Wrong answer18ms3124 KiB
34Wrong answer86ms14572 KiB
35Time limit exceeded1.093s14784 KiB
36Time limit exceeded1.093s14848 KiB
37Time limit exceeded1.098s14696 KiB
38Time limit exceeded1.097s14848 KiB
39Time limit exceeded1.097s14700 KiB
40Wrong answer23ms4324 KiB
41Wrong answer79ms14624 KiB
subtask70/30
42Wrong answer93ms14376 KiB
43Wrong answer257ms14744 KiB
44Time limit exceeded1.098s14572 KiB
45Time limit exceeded1.095s14788 KiB
46Time limit exceeded1.098s14572 KiB
47Time limit exceeded1.098s14700 KiB
48Time limit exceeded1.098s14700 KiB
49Time limit exceeded1.098s14700 KiB
50Wrong answer105ms14496 KiB
51Wrong answer105ms14528 KiB