We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04ed161 commit 358c981Copy full SHA for 358c981
백준/Bronze/8393. 합/README.md
@@ -0,0 +1,28 @@
1
+# [Bronze V] 합 - 8393
2
+
3
+[문제 링크](https://www.acmicpc.net/problem/8393)
4
5
+### 성능 요약
6
7
+메모리: 9336 KB, 시간: 88 ms
8
9
+### 분류
10
11
+구현, 수학
12
13
+### 제출 일자
14
15
+2025년 3월 8일 06:47:55
16
17
+### 문제 설명
18
19
+<p>n이 주어졌을 때, 1부터 n까지 합을 구하는 프로그램을 작성하시오.</p>
20
21
+### 입력
22
23
+ <p>첫째 줄에 n (1 ≤ n ≤ 10,000)이 주어진다.</p>
24
25
+### 출력
26
27
+ <p>1부터 n까지 합을 출력한다.</p>
28
백준/Bronze/8393. 합/합.js
@@ -0,0 +1,11 @@
+const fs = require('fs');
+const input = fs.readFileSync("/dev/stdin").toString().split("\n");
+const num = input[0];
+let sum = 0;
+for (let i = 1; i<= num; i += 1) {
+ sum += i;
+}
+console.log(sum);
0 commit comments