結果

問題 No.480 合計
ユーザー kameyama_skameyama_s
提出日時 2023-03-31 13:17:50
言語 Java21
(openjdk 21)
結果
AC  
実行時間 136 ms / 2,000 ms
コード長 303 bytes
コンパイル時間 2,341 ms
コンパイル使用メモリ 74,568 KB
実行使用メモリ 57,696 KB
最終ジャッジ日時 2023-10-24 00:57:57
合計ジャッジ時間 6,437 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 132 ms
57,608 KB
testcase_01 AC 133 ms
57,484 KB
testcase_02 AC 132 ms
57,548 KB
testcase_03 AC 131 ms
57,372 KB
testcase_04 AC 131 ms
57,436 KB
testcase_05 AC 132 ms
57,444 KB
testcase_06 AC 131 ms
57,364 KB
testcase_07 AC 133 ms
57,428 KB
testcase_08 AC 132 ms
57,580 KB
testcase_09 AC 131 ms
57,428 KB
testcase_10 AC 132 ms
57,380 KB
testcase_11 AC 132 ms
57,696 KB
testcase_12 AC 134 ms
57,432 KB
testcase_13 AC 132 ms
57,428 KB
testcase_14 AC 132 ms
57,456 KB
testcase_15 AC 133 ms
57,524 KB
testcase_16 AC 133 ms
57,468 KB
testcase_17 AC 136 ms
57,476 KB
testcase_18 AC 132 ms
57,444 KB
testcase_19 AC 136 ms
57,460 KB
testcase_20 AC 132 ms
57,520 KB
testcase_21 AC 132 ms
57,544 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int count = 0;
        for(int i = 0; i <= a; i++) {
        	count += i; 
        }
        System.out.println(count);
    }
}
0