Submission #3215613


Source Code Expand

N = int(input())
L = list(map(int,input().split()))
L.sort()
L.reverse()
A = []
i = 0
while (0 <= i <= N-2):
  if (L[i] == L[i+1]):
    A.append(L[i])
    i += 2
    if (len(A) == 2):
      break
  else:
    i += 1
if (len(A) == 2):
  print(A[0]*A[1])
else:
  print(0)

Submission Info

Submission Time
Task C - Make a Rectangle
User Syuko4omi
Language Python (3.4.3)
Score 300
Code Size 285 Byte
Status AC
Exec Time 104 ms
Memory 15020 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 15
Set Name Test Cases
Sample sample1.txt, sample2.txt, sample3.txt
All sample1.txt, sample2.txt, sample3.txt, 1.txt, 2.txt, 3.txt, 4.txt, 5.txt, 6.txt, 7.txt, 8.txt, 9.txt, sample1.txt, sample2.txt, sample3.txt
Case Name Status Exec Time Memory
1.txt AC 77 ms 14252 KB
2.txt AC 37 ms 8488 KB
3.txt AC 104 ms 15020 KB
4.txt AC 77 ms 14224 KB
5.txt AC 37 ms 8504 KB
6.txt AC 59 ms 14080 KB
7.txt AC 58 ms 14244 KB
8.txt AC 33 ms 7496 KB
9.txt AC 59 ms 8508 KB
sample1.txt AC 17 ms 3060 KB
sample2.txt AC 17 ms 3060 KB
sample3.txt AC 16 ms 3064 KB