結果

問題 No.481 1から10
ユーザー tentententen
提出日時 2020-11-11 18:24:23
言語 Java21
(openjdk 21)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 422 bytes
コンパイル時間 2,587 ms
コンパイル使用メモリ 71,476 KB
実行使用メモリ 56,308 KB
最終ジャッジ日時 2023-09-30 00:47:51
合計ジャッジ時間 4,242 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
56,044 KB
testcase_01 AC 119 ms
56,040 KB
testcase_02 AC 120 ms
56,308 KB
testcase_03 AC 121 ms
56,040 KB
testcase_04 AC 120 ms
56,304 KB
testcase_05 AC 119 ms
55,920 KB
testcase_06 AC 119 ms
55,960 KB
testcase_07 AC 118 ms
56,112 KB
testcase_08 AC 118 ms
53,964 KB
testcase_09 AC 117 ms
55,896 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        boolean[] used = new boolean[11];
        for (int i = 0; i < 9; i++) {
            used[sc.nextInt()] = true;
        }
        for (int i = 1; i <= 10; i++) {
            if (!used[i]) {
                System.out.println(i);
                return;
            }
        }
    }
}
0