結果

問題 No.481 1から10
ユーザー syusyu
提出日時 2020-08-25 23:46:49
言語 Java21
(openjdk 21)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 447 bytes
コンパイル時間 2,323 ms
コンパイル使用メモリ 77,072 KB
実行使用メモリ 41,608 KB
最終ジャッジ日時 2024-04-24 04:59:15
合計ジャッジ時間 4,150 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
41,328 KB
testcase_01 AC 116 ms
41,332 KB
testcase_02 AC 121 ms
40,980 KB
testcase_03 AC 117 ms
41,432 KB
testcase_04 AC 119 ms
41,428 KB
testcase_05 AC 116 ms
40,024 KB
testcase_06 AC 112 ms
40,124 KB
testcase_07 AC 120 ms
41,608 KB
testcase_08 AC 115 ms
40,856 KB
testcase_09 AC 120 ms
41,128 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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