Programming/Python & Data Structures
[Baekjoon/Python3] 10823번 더하기 2
HooNeee
2020. 12. 6. 18:21
[Baekjoon/Python3] 10823번 더하기 2
10823번: 더하기 2
문자열 S가 여러 줄에 걸쳐서 주어진다. S의 길이는 최대 10,000이다. 포함되어있는 정수는 1,000,000보다 작거나 같은 자연수이다.
www.acmicpc.net
s = ''
tot = 0
while True:
try:
s += input()
except EOFError:
break
s = s.split(',')
for i in s:
tot += int(i)
print(tot)