백준 15969번: 행복

danbibibi·2021년 12월 3일
0

문제

문제 바로가기> 백준 15969번: 행복

풀이

정렬을 통해 쉽게 문제를 해결할 수 있다.

def solution():
    import sys
    input = sys.stdin.readline
    n = int(input())
    score = list(map(int, input().split()))
    score.sort()
    print(score[n-1]-score[0])
solution()
profile
블로그 이전) https://danbibibi.tistory.com

0개의 댓글

관련 채용 정보