Programming/Python & Data Structures
[Baekjoon/Python3] 8393번 합
HooNeee
2020. 12. 5. 22:03
[Baekjoon/Python3] 8393번 합
8393번: 합
n이 주어졌을 때, 1부터 n까지 합을 구하는 프로그램을 작성하시오.
www.acmicpc.net
n = int(input())
sum = 0
for i in range(n + 1):
sum = sum + i
print(sum)