結果

問題 No.481 1から10
ユーザー jimanojimano
提出日時 2018-01-08 13:30:45
言語 Java21
(openjdk 21)
結果
AC  
実行時間 132 ms / 2,000 ms
コード長 361 bytes
コンパイル時間 3,637 ms
コンパイル使用メモリ 71,588 KB
実行使用メモリ 56,104 KB
最終ジャッジ日時 2023-08-25 00:28:38
合計ジャッジ時間 5,653 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
55,928 KB
testcase_01 AC 131 ms
55,724 KB
testcase_02 AC 132 ms
55,780 KB
testcase_03 AC 132 ms
55,884 KB
testcase_04 AC 128 ms
55,692 KB
testcase_05 AC 132 ms
55,628 KB
testcase_06 AC 128 ms
55,872 KB
testcase_07 AC 127 ms
55,588 KB
testcase_08 AC 129 ms
56,104 KB
testcase_09 AC 128 ms
56,028 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package me.yukicoder.lv1;

import java.util.Scanner;

public class No0481 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int sum = 10 * (10 + 1) / 2;// 1から10までの合計
		int num = sc.nextInt();// 書いた数9個の合計

		while (sc.hasNext()) {
			num += sc.nextInt();
		}

		System.out.println(sum - num);
	}
}
0