[Baekjoon] - 2953. 나는 요리사다
import sys
max_total = 0
who = 0
for i in range(5):
score = list(map(int, sys.stdin.readline().split()))
total = sum(score)
if max_total < total:
max_total = total
who = i + 1
print(who, max_total)
🔑 sum
이라는 함수를 안썼다면 코드가 길어졌겠지만 함수를 사용해서 간결하게 끝낼 수 있었다.
함수 최고,,,👍👍
Author And Source
이 문제에 관하여([Baekjoon] - 2953. 나는 요리사다), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://velog.io/@jjiani/Baekjoon-2953.-나는-요리사다저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)