結果

問題 No.480 合計
ユーザー sysnote8mainsysnote8main
提出日時 2022-11-08 19:42:51
言語 Java21
(openjdk 21)
結果
AC  
実行時間 135 ms / 2,000 ms
コード長 303 bytes
コンパイル時間 2,043 ms
コンパイル使用メモリ 71,644 KB
実行使用メモリ 56,116 KB
最終ジャッジ日時 2023-09-29 09:00:46
合計ジャッジ時間 5,920 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
55,672 KB
testcase_01 AC 126 ms
55,964 KB
testcase_02 AC 125 ms
55,456 KB
testcase_03 AC 126 ms
55,756 KB
testcase_04 AC 126 ms
55,928 KB
testcase_05 AC 128 ms
56,116 KB
testcase_06 AC 129 ms
55,924 KB
testcase_07 AC 128 ms
55,632 KB
testcase_08 AC 127 ms
55,672 KB
testcase_09 AC 127 ms
55,872 KB
testcase_10 AC 127 ms
55,460 KB
testcase_11 AC 128 ms
55,784 KB
testcase_12 AC 128 ms
55,840 KB
testcase_13 AC 126 ms
55,772 KB
testcase_14 AC 127 ms
55,416 KB
testcase_15 AC 128 ms
55,432 KB
testcase_16 AC 128 ms
55,464 KB
testcase_17 AC 129 ms
55,396 KB
testcase_18 AC 129 ms
55,728 KB
testcase_19 AC 129 ms
55,708 KB
testcase_20 AC 135 ms
55,916 KB
testcase_21 AC 131 ms
55,868 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int output = 0;
        for(int i = 0;i<n;i++) {
            output += i+1;
        }
        System.out.println(output);
    }
}
0