← Back to List
5341번: Pyramids ↗
Solutions
Python 3
92 B | 92 chars
while 1: a = int(input()) if a == 0: break print(a * (a + 1) // 2)