結果

問題 No.480 合計
ユーザー nesaianesaia
提出日時 2017-04-17 15:24:06
言語 Java21
(openjdk 21)
結果
AC  
実行時間 43 ms / 2,000 ms
コード長 524 bytes
コンパイル時間 3,155 ms
コンパイル使用メモリ 72,140 KB
実行使用メモリ 49,708 KB
最終ジャッジ日時 2023-08-21 01:42:46
合計ジャッジ時間 5,119 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
49,504 KB
testcase_01 AC 42 ms
49,308 KB
testcase_02 AC 43 ms
49,364 KB
testcase_03 AC 43 ms
49,316 KB
testcase_04 AC 43 ms
47,388 KB
testcase_05 AC 43 ms
49,504 KB
testcase_06 AC 43 ms
49,508 KB
testcase_07 AC 42 ms
49,176 KB
testcase_08 AC 42 ms
49,156 KB
testcase_09 AC 43 ms
49,172 KB
testcase_10 AC 42 ms
49,320 KB
testcase_11 AC 42 ms
49,272 KB
testcase_12 AC 43 ms
49,560 KB
testcase_13 AC 43 ms
49,320 KB
testcase_14 AC 43 ms
49,364 KB
testcase_15 AC 43 ms
49,260 KB
testcase_16 AC 43 ms
49,380 KB
testcase_17 AC 43 ms
49,396 KB
testcase_18 AC 42 ms
49,304 KB
testcase_19 AC 43 ms
49,708 KB
testcase_20 AC 43 ms
49,300 KB
testcase_21 AC 42 ms
49,604 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

//No.480 合計
//https://yukicoder.me/problems/no/480
//20170417 1519

package no480;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class No480 {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String inLine;
		int n;
		int sum = 0;

		inLine = br.readLine();
		
		n = Integer.parseInt(inLine);
		
		for(int i = 1; i <= n; i++){
			sum += i;
		}
		System.out.print(sum);
	}
}
0