結果

問題 No.480 合計
ユーザー mm
提出日時 2021-01-31 06:44:11
言語 Java21
(openjdk 21)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 352 bytes
コンパイル時間 3,168 ms
コンパイル使用メモリ 71,948 KB
実行使用メモリ 39,892 KB
最終ジャッジ日時 2023-09-11 02:15:27
合計ジャッジ時間 6,959 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
39,260 KB
testcase_01 AC 116 ms
39,888 KB
testcase_02 AC 115 ms
39,540 KB
testcase_03 AC 118 ms
39,892 KB
testcase_04 AC 121 ms
39,800 KB
testcase_05 AC 120 ms
39,476 KB
testcase_06 AC 120 ms
39,468 KB
testcase_07 AC 118 ms
39,216 KB
testcase_08 AC 117 ms
39,360 KB
testcase_09 AC 117 ms
39,260 KB
testcase_10 AC 117 ms
39,476 KB
testcase_11 AC 119 ms
39,736 KB
testcase_12 AC 117 ms
39,276 KB
testcase_13 AC 117 ms
39,508 KB
testcase_14 AC 120 ms
39,468 KB
testcase_15 AC 117 ms
39,336 KB
testcase_16 AC 116 ms
39,440 KB
testcase_17 AC 116 ms
39,876 KB
testcase_18 AC 117 ms
39,596 KB
testcase_19 AC 119 ms
39,796 KB
testcase_20 AC 117 ms
39,560 KB
testcase_21 AC 116 ms
39,484 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package hello;

import java.util.Scanner;

public class HelloWorld {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//        String s = sc.next();
		int a = sc.nextInt();
		int sum = 0;
		for (int i = 0; i < a; i++) {
			sum += i + 1;
		}
		//		System.out.println("Hello World!");
		System.out.println(sum);
	}

}
0