본문 바로가기
백준문제/브론즈 5

백준) 1037번 - python

by kiseno 2024. 2. 6.
728x90
반응형
SMALL
a = int(input())
b = list(map(int, input().split()))
lst = []
for i in range(a):
    lst.append(b[i])
lst.sort()

if a % 2 == 0:
    print(lst[0] * lst[-1])
else:
    print(lst[int(a/2)] ** 2)
728x90
반응형
LIST

'백준문제 > 브론즈 5' 카테고리의 다른 글

백준) 2525번 - python  (1) 2024.02.11
백준) 2395번 - python  (0) 2024.02.10
백준) 2163번 - python  (0) 2024.02.09
백준) 1546번 - python  (0) 2024.02.08
백준) 1152번 - python  (0) 2024.02.07