結果

問題 No.480 合計
ユーザー face4face4
提出日時 2018-04-10 00:14:21
言語 Java21
(openjdk 21)
結果
AC  
実行時間 44 ms / 2,000 ms
コード長 357 bytes
コンパイル時間 1,853 ms
コンパイル使用メモリ 71,564 KB
実行使用メモリ 49,872 KB
最終ジャッジ日時 2023-09-09 03:43:31
合計ジャッジ時間 3,908 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
49,232 KB
testcase_01 AC 42 ms
49,416 KB
testcase_02 AC 42 ms
49,368 KB
testcase_03 AC 43 ms
49,156 KB
testcase_04 AC 42 ms
49,632 KB
testcase_05 AC 42 ms
49,508 KB
testcase_06 AC 42 ms
49,316 KB
testcase_07 AC 42 ms
49,140 KB
testcase_08 AC 43 ms
49,324 KB
testcase_09 AC 42 ms
49,488 KB
testcase_10 AC 44 ms
49,336 KB
testcase_11 AC 42 ms
49,496 KB
testcase_12 AC 44 ms
49,160 KB
testcase_13 AC 43 ms
49,872 KB
testcase_14 AC 42 ms
49,428 KB
testcase_15 AC 42 ms
49,404 KB
testcase_16 AC 42 ms
49,416 KB
testcase_17 AC 42 ms
49,444 KB
testcase_18 AC 43 ms
49,416 KB
testcase_19 AC 43 ms
49,456 KB
testcase_20 AC 43 ms
49,220 KB
testcase_21 AC 43 ms
49,236 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());

        System.out.println((n * (n + 1) / 2));
    }
}
0