結果

問題 No.481 1から10
ユーザー bellbell
提出日時 2021-02-12 20:01:15
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 2,000 ms
コード長 432 bytes
コンパイル時間 2,513 ms
コンパイル使用メモリ 71,380 KB
実行使用メモリ 56,000 KB
最終ジャッジ日時 2023-09-27 01:11:01
合計ジャッジ時間 4,926 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
55,628 KB
testcase_01 AC 129 ms
55,696 KB
testcase_02 AC 125 ms
55,632 KB
testcase_03 AC 125 ms
56,000 KB
testcase_04 AC 124 ms
55,716 KB
testcase_05 AC 126 ms
55,668 KB
testcase_06 AC 125 ms
55,716 KB
testcase_07 AC 126 ms
55,916 KB
testcase_08 AC 126 ms
55,952 KB
testcase_09 AC 126 ms
55,984 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int n=0;
        int result=0;

        for(int i=1; i<=9; i++){
            n=sc.nextInt();
        if(i != n){
            result=n-1;
            break;
        }
        if(result==0){
            result=10;
        }
    }
        System.out.println(result);
            sc.close();
		}
    }
0