結果

問題 No.480 合計
ユーザー jimanojimano
提出日時 2018-01-08 13:21:55
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 244 bytes
コンパイル時間 3,104 ms
コンパイル使用メモリ 72,864 KB
実行使用メモリ 56,380 KB
最終ジャッジ日時 2023-08-25 00:27:57
合計ジャッジ時間 6,909 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,924 KB
testcase_01 AC 128 ms
55,748 KB
testcase_02 AC 126 ms
55,864 KB
testcase_03 AC 124 ms
56,064 KB
testcase_04 AC 120 ms
55,828 KB
testcase_05 AC 126 ms
56,092 KB
testcase_06 AC 125 ms
55,980 KB
testcase_07 AC 127 ms
55,828 KB
testcase_08 AC 127 ms
55,872 KB
testcase_09 AC 124 ms
56,216 KB
testcase_10 AC 122 ms
55,944 KB
testcase_11 AC 123 ms
55,924 KB
testcase_12 AC 125 ms
56,380 KB
testcase_13 AC 121 ms
55,940 KB
testcase_14 AC 121 ms
55,872 KB
testcase_15 AC 122 ms
55,844 KB
testcase_16 AC 123 ms
55,844 KB
testcase_17 AC 126 ms
55,488 KB
testcase_18 AC 119 ms
56,360 KB
testcase_19 AC 121 ms
55,840 KB
testcase_20 AC 119 ms
56,224 KB
testcase_21 AC 122 ms
55,948 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.util.stream.IntStream;

public class No0480 {
	public static void main(String[] args) {
		int n = new Scanner(System.in).nextInt();
                int sum = n * (n + 1) / 2;
		System.out.println(sum);
	}
}
0