![[C++] 백준 3단계 - 8393번 문제](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdna%2FbnwFv1%2Fbtr5dfkNGzq%2FAAAAAAAAAAAAAAAAAAAAAA2OoTr1ELLNWBCfRICzSDaWAYl5OdzKunkKZMQYcaw2%2Fimg.png%3Fcredential%3DyqXZFxpELC7KVnFOS48ylbz2pIh7yKj8%26expires%3D1753973999%26allow_ip%3D%26allow_referer%3D%26signature%3DlhIybk%252BUlIhdQM6JL7dOgcMpOwk%253D)
[C++] 백준 3단계 - 8393번 문제자료구조 & 알고리즘/BOJ2023. 3. 21. 17:15
Table of Contents
문제설명
소스코드
#include<iostream>
using namespace std;
int main()
{
int input; int sum = 0;
cin >> input;
for (int i = 1; i <= input; ++i)
{
sum += i;
}
cout << sum << endl;
}
'자료구조 & 알고리즘 > BOJ' 카테고리의 다른 글
[C++] 백준 3단계 - 25314번 문제 (0) | 2023.03.23 |
---|---|
[C++] 백준 3단계 - 25304번 문제 (0) | 2023.03.22 |
[C++] 백준 3단계 - 10950번 문제 (0) | 2023.03.21 |
[C++] 백준 3단계 - 2739번 문제 (0) | 2023.03.20 |
[C++] 백준 2단계 - 2480번 문제 (0) | 2023.03.20 |