結果

問題 No.480 合計
ユーザー wnwwwnwnwwwn
提出日時 2020-04-02 06:43:32
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 370 bytes
コンパイル時間 3,175 ms
コンパイル使用メモリ 71,196 KB
実行使用メモリ 56,060 KB
最終ジャッジ日時 2023-09-10 08:17:27
合計ジャッジ時間 7,273 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
55,660 KB
testcase_01 AC 127 ms
55,564 KB
testcase_02 AC 126 ms
55,804 KB
testcase_03 AC 126 ms
55,700 KB
testcase_04 AC 127 ms
55,496 KB
testcase_05 AC 126 ms
55,756 KB
testcase_06 AC 126 ms
55,500 KB
testcase_07 AC 126 ms
55,492 KB
testcase_08 AC 128 ms
55,912 KB
testcase_09 AC 125 ms
55,608 KB
testcase_10 AC 125 ms
56,060 KB
testcase_11 AC 124 ms
55,828 KB
testcase_12 AC 124 ms
55,712 KB
testcase_13 AC 125 ms
55,860 KB
testcase_14 AC 125 ms
55,204 KB
testcase_15 AC 127 ms
55,704 KB
testcase_16 WA -
testcase_17 AC 124 ms
55,432 KB
testcase_18 AC 125 ms
55,480 KB
testcase_19 AC 126 ms
55,468 KB
testcase_20 AC 124 ms
55,964 KB
testcase_21 AC 125 ms
55,528 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.util.Scanner;

public class No480 {
	public static void main(String[] args) {
		//Scannerを使用し、入力
		Scanner sr = new Scanner(System.in);

		//iを入力
		int i = sr.nextInt();

		//ans 初期化
		int ans = 0;

		for (; i < 100; i--) {
			ans = ans + i;

			if (i == 0) {
				break;
			}
		}
		System.out.println(ans);
	}
}
0