백준 33709번: 치매예방수칙 3.3.3 #Python

ColorlessDia·2025년 5월 2일

algorithm/baekjoon

목록 보기
530/836
N = int(input())
S = input()

temp = []
count = 0

for char in S:
    
    if char.isdigit():
        temp.append(char)
        continue
    
    count += int(''.join(temp))
    temp = []

count += int(''.join(temp))

print(count)

0개의 댓글