結果

問題 No.480 合計
ユーザー Hdz06052373Hdz06052373
提出日時 2017-08-24 20:51:04
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 2,000 ms
コード長 230 bytes
コンパイル時間 1,869 ms
コンパイル使用メモリ 70,944 KB
実行使用メモリ 56,252 KB
最終ジャッジ日時 2023-08-21 01:58:05
合計ジャッジ時間 5,608 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,788 KB
testcase_01 AC 117 ms
55,756 KB
testcase_02 AC 121 ms
55,708 KB
testcase_03 AC 121 ms
55,656 KB
testcase_04 AC 121 ms
55,756 KB
testcase_05 AC 122 ms
55,628 KB
testcase_06 AC 122 ms
55,916 KB
testcase_07 AC 124 ms
55,788 KB
testcase_08 AC 124 ms
55,616 KB
testcase_09 AC 122 ms
55,568 KB
testcase_10 AC 121 ms
55,336 KB
testcase_11 AC 122 ms
55,528 KB
testcase_12 AC 122 ms
55,580 KB
testcase_13 AC 123 ms
56,084 KB
testcase_14 AC 122 ms
55,944 KB
testcase_15 AC 122 ms
55,916 KB
testcase_16 AC 123 ms
55,864 KB
testcase_17 AC 123 ms
55,692 KB
testcase_18 AC 122 ms
55,968 KB
testcase_19 AC 123 ms
56,252 KB
testcase_20 AC 122 ms
55,872 KB
testcase_21 AC 122 ms
55,532 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

public class Main{
	public static void main(String[] args){
		int x = 0;
		int n = new java.util.Scanner(System.in).nextInt();
		if(1<=n || n<=100){ 
			for(int i = 0;i <= n;i++){
				x += i;
			}
		}
		System.out.println(x);
	}
}
0