본문 바로가기

Algorithm/BaekJOON(Python)

[백준/입출력/10818] 최소,최대

이미지 클릭시, 문제로 이동됩니닷 :)

x = int(input())
y = list(map(int, input().split()))
if len(y) == x :
  y.sort()
  print(y[0], y[-1])
else:
  print("error")

'Algorithm > BaekJOON(Python)' 카테고리의 다른 글