結果

問題 No.480 合計
ユーザー dogwood0424dogwood0424
提出日時 2017-11-25 20:55:53
言語 Java21
(openjdk 21)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 268 bytes
コンパイル時間 3,790 ms
コンパイル使用メモリ 72,348 KB
実行使用メモリ 56,176 KB
最終ジャッジ日時 2023-08-21 02:08:40
合計ジャッジ時間 6,997 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,880 KB
testcase_01 AC 126 ms
55,772 KB
testcase_02 AC 126 ms
55,896 KB
testcase_03 AC 124 ms
55,760 KB
testcase_04 AC 123 ms
55,676 KB
testcase_05 AC 124 ms
55,656 KB
testcase_06 AC 127 ms
55,884 KB
testcase_07 AC 123 ms
55,948 KB
testcase_08 AC 124 ms
56,012 KB
testcase_09 AC 124 ms
55,852 KB
testcase_10 AC 123 ms
55,676 KB
testcase_11 AC 121 ms
55,632 KB
testcase_12 AC 124 ms
55,824 KB
testcase_13 AC 122 ms
56,176 KB
testcase_14 AC 124 ms
55,972 KB
testcase_15 AC 123 ms
55,664 KB
testcase_16 AC 122 ms
55,712 KB
testcase_17 AC 125 ms
55,752 KB
testcase_18 AC 130 ms
55,736 KB
testcase_19 AC 129 ms
55,408 KB
testcase_20 AC 130 ms
55,896 KB
testcase_21 AC 127 ms
55,668 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner ;
public class Oneton {
	public static void main(String[]args) {

		Scanner stdIn = new Scanner(System.in);
		int a = stdIn.nextInt();
		int sum;

		sum = 0;

		for(int i=0; i < a ;i++) {
			sum += i+1	;
		}

		System.out.println(sum);


	}

}
0