結果

問題 No.480 合計
ユーザー tentententen
提出日時 2020-11-11 17:28:29
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 213 bytes
コンパイル時間 2,504 ms
コンパイル使用メモリ 71,076 KB
実行使用メモリ 56,352 KB
最終ジャッジ日時 2023-09-30 00:36:03
合計ジャッジ時間 5,709 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,828 KB
testcase_01 AC 121 ms
55,884 KB
testcase_02 AC 123 ms
55,988 KB
testcase_03 AC 122 ms
55,624 KB
testcase_04 AC 124 ms
56,108 KB
testcase_05 AC 122 ms
55,648 KB
testcase_06 AC 123 ms
55,820 KB
testcase_07 AC 119 ms
56,352 KB
testcase_08 AC 121 ms
55,752 KB
testcase_09 AC 117 ms
56,208 KB
testcase_10 AC 119 ms
56,300 KB
testcase_11 AC 121 ms
55,748 KB
testcase_12 AC 126 ms
55,968 KB
testcase_13 AC 121 ms
56,048 KB
testcase_14 AC 120 ms
56,152 KB
testcase_15 AC 121 ms
55,768 KB
testcase_16 AC 119 ms
55,696 KB
testcase_17 AC 125 ms
55,956 KB
testcase_18 AC 121 ms
56,004 KB
testcase_19 AC 120 ms
56,112 KB
testcase_20 AC 121 ms
55,876 KB
testcase_21 AC 124 ms
56,196 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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