[백준/Python] 5800 - 성적 통계

orangesnail·2025년 3월 28일

백준

목록 보기
85/169

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


k = int(input())
for i in range(k):
    nums = list(map(int, input().split()))
    n = nums[0]
    score = nums[1:]

    score.sort()
    gap = [score[i + 1] - score[i] for i in range(n - 1)]
    print(f"Class {i + 1}")
    print(f"Max {max(score)}, Min {min(score)}, Largest gap {max(gap)}")
profile
초보입니다. 피드백 환영합니다 😗

0개의 댓글