티스토리 뷰
import sys
num = int(sys.stdin.readline())
arr = list(map(int, sys.stdin.readline().split()))
arr.sort()
print(f"{arr[0]} {arr[-1]}")
근데 보니까 메모리랑 런타임이 너무 길다. list로 짜서 그런가...
'Algorithm > noj.am' 카테고리의 다른 글
[Python] 백준 2445번 - 별찍기 8 (0) | 2020.12.30 |
---|---|
[Python] 백준 2442번 - 별찍기 5 (0) | 2020.12.30 |
[Python] 백준 11022번 - A+B - 8 (0) | 2020.12.30 |
[Python] 백준 11021번 - A+B - 7 (0) | 2020.12.30 |
[Python] 백준 10953번 - A+B-6 (0) | 2020.12.30 |