11568 | 2024-10-27 01:47:07 | balint | Legnagyobb téglalap | python3 | Wrong answer 10/100 | 83ms | 22252 KiB |
from collections import Counter
import sys
def main():
nums = sorted([(num, count) for num, count in Counter(map(int, sys.stdin.read().splitlines()[1].split())).items() if count > 1], reverse=True, key= lambda x: x[0])
if len(nums) == 0:
print(0)
elif len(nums) == 1:
print(nums[0][0]**2 if nums[0][1] >= 4 else 0)
else:
print(nums[0][0] * nums[1][0])
main()
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 17ms | 3368 KiB | ||||
2 | Accepted | 18ms | 3576 KiB | ||||
3 | Accepted | 18ms | 3284 KiB | ||||
subtask2 | 10/10 | ||||||
4 | Accepted | 19ms | 3400 KiB | ||||
5 | Accepted | 18ms | 3388 KiB | ||||
6 | Accepted | 18ms | 3268 KiB | ||||
7 | Accepted | 18ms | 3528 KiB | ||||
8 | Accepted | 18ms | 3384 KiB | ||||
subtask3 | 0/10 | ||||||
9 | Accepted | 18ms | 3348 KiB | ||||
10 | Accepted | 18ms | 3556 KiB | ||||
11 | Accepted | 18ms | 3384 KiB | ||||
12 | Accepted | 18ms | 3384 KiB | ||||
13 | Accepted | 41ms | 4924 KiB | ||||
14 | Wrong answer | 39ms | 4784 KiB | ||||
subtask4 | 0/15 | ||||||
15 | Accepted | 18ms | 3384 KiB | ||||
16 | Accepted | 17ms | 3384 KiB | ||||
17 | Accepted | 18ms | 3576 KiB | ||||
18 | Accepted | 18ms | 3524 KiB | ||||
19 | Accepted | 19ms | 3524 KiB | ||||
20 | Accepted | 18ms | 3488 KiB | ||||
21 | Accepted | 18ms | 3504 KiB | ||||
22 | Accepted | 17ms | 3376 KiB | ||||
23 | Wrong answer | 18ms | 3400 KiB | ||||
24 | Accepted | 18ms | 3460 KiB | ||||
subtask5 | 0/20 | ||||||
25 | Accepted | 19ms | 3504 KiB | ||||
26 | Accepted | 20ms | 4204 KiB | ||||
27 | Accepted | 20ms | 4112 KiB | ||||
28 | Accepted | 20ms | 4180 KiB | ||||
29 | Accepted | 23ms | 4152 KiB | ||||
30 | Wrong answer | 20ms | 4236 KiB | ||||
31 | Accepted | 20ms | 4152 KiB | ||||
32 | Accepted | 19ms | 3896 KiB | ||||
subtask6 | 0/15 | ||||||
33 | Accepted | 19ms | 3516 KiB | ||||
34 | Accepted | 67ms | 16760 KiB | ||||
35 | Accepted | 81ms | 22252 KiB | ||||
36 | Accepted | 75ms | 22084 KiB | ||||
37 | Accepted | 82ms | 22212 KiB | ||||
38 | Wrong answer | 74ms | 22248 KiB | ||||
39 | Accepted | 75ms | 22236 KiB | ||||
40 | Accepted | 21ms | 4152 KiB | ||||
41 | Accepted | 61ms | 12556 KiB | ||||
subtask7 | 0/30 | ||||||
42 | Wrong answer | 56ms | 10916 KiB | ||||
43 | Accepted | 75ms | 22252 KiB | ||||
44 | Accepted | 83ms | 22248 KiB | ||||
45 | Accepted | 83ms | 22252 KiB | ||||
46 | Accepted | 75ms | 22216 KiB | ||||
47 | Wrong answer | 75ms | 22172 KiB | ||||
48 | Accepted | 76ms | 22108 KiB | ||||
49 | Accepted | 82ms | 22248 KiB | ||||
50 | Accepted | 67ms | 12448 KiB | ||||
51 | Accepted | 72ms | 13932 KiB |