結果

問題 No.480 合計
ユーザー jonki324jonki324
提出日時 2018-06-03 00:36:38
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 2,000 ms
コード長 298 bytes
コンパイル時間 2,043 ms
コンパイル使用メモリ 70,988 KB
実行使用メモリ 56,460 KB
最終ジャッジ日時 2023-09-12 21:41:49
合計ジャッジ時間 5,638 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,696 KB
testcase_01 AC 122 ms
56,196 KB
testcase_02 AC 122 ms
56,292 KB
testcase_03 AC 122 ms
55,704 KB
testcase_04 AC 122 ms
55,440 KB
testcase_05 AC 123 ms
55,748 KB
testcase_06 AC 123 ms
55,848 KB
testcase_07 AC 123 ms
55,528 KB
testcase_08 AC 123 ms
56,080 KB
testcase_09 AC 123 ms
56,460 KB
testcase_10 AC 124 ms
56,192 KB
testcase_11 AC 124 ms
55,732 KB
testcase_12 AC 123 ms
55,432 KB
testcase_13 AC 121 ms
56,200 KB
testcase_14 AC 123 ms
55,940 KB
testcase_15 AC 124 ms
55,828 KB
testcase_16 AC 122 ms
55,760 KB
testcase_17 AC 122 ms
55,808 KB
testcase_18 AC 124 ms
55,836 KB
testcase_19 AC 123 ms
55,744 KB
testcase_20 AC 124 ms
53,952 KB
testcase_21 AC 122 ms
55,860 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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