結果

問題 No.480 合計
ユーザー 37zigen37zigen
提出日時 2017-02-11 01:40:05
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 2,000 ms
コード長 238 bytes
コンパイル時間 2,535 ms
コンパイル使用メモリ 71,836 KB
実行使用メモリ 56,548 KB
最終ジャッジ日時 2023-08-21 01:32:28
合計ジャッジ時間 5,616 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
56,324 KB
testcase_01 AC 125 ms
55,688 KB
testcase_02 AC 118 ms
56,304 KB
testcase_03 AC 117 ms
55,964 KB
testcase_04 AC 119 ms
55,952 KB
testcase_05 AC 119 ms
55,796 KB
testcase_06 AC 116 ms
55,716 KB
testcase_07 AC 119 ms
56,160 KB
testcase_08 AC 117 ms
55,984 KB
testcase_09 AC 115 ms
56,548 KB
testcase_10 AC 117 ms
55,772 KB
testcase_11 AC 117 ms
56,256 KB
testcase_12 AC 117 ms
56,116 KB
testcase_13 AC 117 ms
55,716 KB
testcase_14 AC 119 ms
55,832 KB
testcase_15 AC 118 ms
55,896 KB
testcase_16 AC 117 ms
56,008 KB
testcase_17 AC 117 ms
56,016 KB
testcase_18 AC 116 ms
56,036 KB
testcase_19 AC 118 ms
55,768 KB
testcase_20 AC 121 ms
55,560 KB
testcase_21 AC 119 ms
56,236 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		long sum = 0;
		for (int i = 1; i <= N; ++i) {
			sum += i;
		}
		System.out.println(sum);
	}
}
0