結果

問題 No.481 1から10
ユーザー Daigo HIROOKADaigo HIROOKA
提出日時 2018-05-13 22:32:14
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 420 bytes
コンパイル時間 3,384 ms
コンパイル使用メモリ 72,428 KB
実行使用メモリ 56,060 KB
最終ジャッジ日時 2023-09-10 19:35:26
合計ジャッジ時間 5,420 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,484 KB
testcase_01 AC 122 ms
55,456 KB
testcase_02 AC 128 ms
55,908 KB
testcase_03 AC 124 ms
56,060 KB
testcase_04 AC 122 ms
55,636 KB
testcase_05 AC 125 ms
55,860 KB
testcase_06 AC 123 ms
56,044 KB
testcase_07 AC 124 ms
55,640 KB
testcase_08 AC 123 ms
55,600 KB
testcase_09 AC 124 ms
55,712 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class FromOnetoTen{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        for(int i = 1; i <= 9; i++){
            int b = sc.nextInt();
            if(b != i){
                System.out.println(i);
                break;
            }
            if(i == 9 && b == 9){
                System.out.println(10);
            }
        }
    }
}
0