結果

問題 No.480 合計
ユーザー GchansanjouGchansanjou
提出日時 2018-02-08 01:13:33
言語 Java21
(openjdk 21)
結果
AC  
実行時間 136 ms / 2,000 ms
コード長 301 bytes
コンパイル時間 3,231 ms
コンパイル使用メモリ 73,860 KB
実行使用メモリ 57,488 KB
最終ジャッジ日時 2023-10-21 13:13:23
合計ジャッジ時間 7,147 ms
ジャッジサーバーID
(参考情報)
judge12 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
57,388 KB
testcase_01 AC 129 ms
57,372 KB
testcase_02 AC 127 ms
57,360 KB
testcase_03 AC 125 ms
57,268 KB
testcase_04 AC 125 ms
57,316 KB
testcase_05 AC 124 ms
57,356 KB
testcase_06 AC 126 ms
57,488 KB
testcase_07 AC 125 ms
57,344 KB
testcase_08 AC 123 ms
57,384 KB
testcase_09 AC 113 ms
56,140 KB
testcase_10 AC 124 ms
57,268 KB
testcase_11 AC 127 ms
57,432 KB
testcase_12 AC 128 ms
57,348 KB
testcase_13 AC 131 ms
57,256 KB
testcase_14 AC 136 ms
57,352 KB
testcase_15 AC 129 ms
57,380 KB
testcase_16 AC 130 ms
57,484 KB
testcase_17 AC 131 ms
57,364 KB
testcase_18 AC 130 ms
57,284 KB
testcase_19 AC 126 ms
57,348 KB
testcase_20 AC 129 ms
57,372 KB
testcase_21 AC 129 ms
57,480 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukiCoder;

import java.util.Scanner;

public class No00480 {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int last = sc.nextInt();
		sc.close();

		int ans = 0;
		for (int i = 1; i <= last ; i++) {
			ans = ans + i;
		}
		System.out.println(ans);
	}

}
0