-
[BAEK JOON] 2851. 슈퍼 마리오 (Python)공부/알고리즘 2024. 5. 8. 01:12
문제링크
제출코드
mushroom = [] score = 0 for i in range(10): mushroom.append(int(input())) for j in mushroom: score += j if score >= 100: if (score-100) <= 100 - (score-j): break else: score-=j break print(score)
'공부 > 알고리즘' 카테고리의 다른 글
[BAEK JOON] 2965. 캥거루 세마리 (Python) (0) 2024.05.20 [BAEK JOON] 2145. 숫자놀이 (Python) (0) 2024.05.06 [BAEK JOON] 1292. 쉽게 푸는 문제 (Python) (1) 2024.04.28 [BAEK JOON] 1251. 단어 나누기 (Python) (0) 2024.04.27 [BAEK JOON] 1094. 막대기 (Python) (0) 2024.04.25