結果

問題 No.480 合計
ユーザー mhayamhaya
提出日時 2019-04-21 06:52:13
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 2,000 ms
コード長 380 bytes
コンパイル時間 3,248 ms
コンパイル使用メモリ 74,204 KB
実行使用メモリ 54,256 KB
最終ジャッジ日時 2024-04-15 04:08:58
合計ジャッジ時間 6,311 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
54,104 KB
testcase_01 AC 119 ms
54,088 KB
testcase_02 AC 109 ms
52,920 KB
testcase_03 AC 120 ms
54,200 KB
testcase_04 AC 121 ms
53,984 KB
testcase_05 AC 123 ms
53,992 KB
testcase_06 AC 121 ms
54,144 KB
testcase_07 AC 120 ms
54,100 KB
testcase_08 AC 113 ms
53,504 KB
testcase_09 AC 108 ms
52,664 KB
testcase_10 AC 120 ms
54,068 KB
testcase_11 AC 106 ms
52,956 KB
testcase_12 AC 115 ms
53,688 KB
testcase_13 AC 122 ms
53,884 KB
testcase_14 AC 117 ms
54,004 KB
testcase_15 AC 119 ms
54,116 KB
testcase_16 AC 122 ms
53,824 KB
testcase_17 AC 110 ms
53,044 KB
testcase_18 AC 117 ms
53,776 KB
testcase_19 AC 120 ms
54,256 KB
testcase_20 AC 124 ms
54,028 KB
testcase_21 AC 122 ms
54,128 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Study {

	public static void main(String[] args) {
        // 標準入力から読み込む際に、Scannerオブジェクトを使う。
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int s = 0;
        for (int i = 0; i < a; i++) {
        	s += i + 1;
        }

        System.out.println(s);
	}

}
0