Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

백준 15969번 _ 행복

놓친 것

- max, min을 생각 못함
- 백준에서 python input에 대한 숙련도가 아직 낮음

내가 짠 코드

N = map(int, input().split())
data = list(map(int, input().split()))

data.sort()

print(data[-1]-data[0])

가장 적절한 코드

N, lst = input(), list(map(int, input().split()))

print(max(lst)- min(lst))