結果

問題 No.480 合計
ユーザー springspring
提出日時 2019-06-12 11:11:20
言語 Java21
(openjdk 21)
結果
AC  
実行時間 132 ms / 2,000 ms
コード長 280 bytes
コンパイル時間 1,926 ms
コンパイル使用メモリ 73,804 KB
実行使用メモリ 54,356 KB
最終ジャッジ日時 2024-04-17 23:33:07
合計ジャッジ時間 5,461 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
53,996 KB
testcase_01 AC 115 ms
52,960 KB
testcase_02 AC 128 ms
54,156 KB
testcase_03 AC 128 ms
54,276 KB
testcase_04 AC 127 ms
54,256 KB
testcase_05 AC 125 ms
53,880 KB
testcase_06 AC 127 ms
54,148 KB
testcase_07 AC 130 ms
54,256 KB
testcase_08 AC 113 ms
52,992 KB
testcase_09 AC 120 ms
53,836 KB
testcase_10 AC 124 ms
54,060 KB
testcase_11 AC 125 ms
53,860 KB
testcase_12 AC 114 ms
52,724 KB
testcase_13 AC 126 ms
54,124 KB
testcase_14 AC 126 ms
54,300 KB
testcase_15 AC 116 ms
53,212 KB
testcase_16 AC 130 ms
54,356 KB
testcase_17 AC 129 ms
54,264 KB
testcase_18 AC 130 ms
54,172 KB
testcase_19 AC 132 ms
53,868 KB
testcase_20 AC 130 ms
54,200 KB
testcase_21 AC 132 ms
54,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int input = sc.nextInt();
		int result = 0;
		for(int i=1;input>=i;i++){
			result += i;
		}
		System.out.println(result);


	}//mainmethod

} //class
0