백준 5341번: Pyramids #Python

ColorlessDia·2024년 2월 7일

algorithm/baekjoon

목록 보기
32/807
import sys

while True:
    N = int(sys.stdin.readline())

    if N == 0:
        break

    print(sum([i for i in range(1, N + 1)]))

0개의 댓글