https://www.acmicpc.net/problem/23795
lst = [0]
n = int(input())
while n != -1:
lst.append(n)
n = int(input())
print(sum(lst))
단순 구현 문제이다.
'코딩테스트' 카테고리의 다른 글
[백준 python] 1271 : 엄청난 부자2 (브론즈 5) (0) | 2024.07.30 |
---|---|
[백준 python] 18111 번 : 마인크래프트 (실버 2) (0) | 2024.07.29 |
[python] 백준 17626 : Four Squares (실버 3) (2) | 2024.07.24 |
[python] 백준 9461 번 : 파도반 수열 (실버 3) (2) | 2024.07.23 |
[python] 백준 9375 : 패션왕 신해빈 (실버 3) (0) | 2024.07.22 |