코딩테스트

[백준 python] 23795번 : 사장님 도박은 재미로 하셔야 합니다. (브론즈 4)

Alpaca_data_cloud 2024. 7. 25. 11:53

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

lst = [0]
n = int(input())
while n != -1:
    lst.append(n)
    n = int(input())

print(sum(lst))

 

단순 구현 문제이다.