본문 바로가기
백준문제/브론즈 5

백준) 5341번 - python

by kiseno 2024. 2. 20.
728x90
반응형
SMALL
result =[]

while True:
    mid_result,a = 0, int(input())
    if a==0:
        for i in range(len(result)):
            print(result[i],end='\n')
        break
    else:
        for i in range(1,a+1):
            mid_result += i
        result.append(mid_result)
728x90
반응형
LIST

'백준문제 > 브론즈 5' 카테고리의 다른 글

백준) 5622번 - python  (0) 2024.02.22
백준) 5522번 - python  (0) 2024.02.21
백준) 4999번 - python  (0) 2024.02.19
백준) 4673번 - python  (0) 2024.02.18
백준) 4101번 - python  (0) 2024.02.17