백준 10818 (파이썬)

김덕현·2021년 5월 30일
1

BAEKJOON

목록 보기
31/62

1.문제

https://www.acmicpc.net/problem/10818

2.코드

n=int(input())
a=list(map(int,input().split()))
print("%d %d"%(min(a),max(a)))

3.코드해설

함수 min은 list의 요소 중 최솟값을 구해주고
함수 max는 list의 요소 중 최댓값을 구해준다.

profile
BAEKJOON STUDYING

0개의 댓글