BOJ/Baekjun-15969-python
質問する
に答える
max
とmin
を用いて点数の差を求めればよい.コード#コード#
# https://www.acmicpc.net/problem/15969
# boj, 15969: 행복, python3
import sys
input = sys.stdin.readline
def solve(scores: list) -> int:
return max(scores) - min(scores)
if __name__ == '__main__':
n = int(input())
scores = list(map(int, input().split()))
print(solve(scores))
結果
ソース&ハーブ
BOJ 15969
GITHUB
Reference
この問題について(BOJ/Baekjun-15969-python), 我々は、より多くの情報をここで見つけました https://velog.io/@cosmos/BOJ백준-15969-pythonテキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol