結果

問題 No.481 1から10
ユーザー KatoooooKatooooo
提出日時 2017-02-25 20:16:59
言語 Java21
(openjdk 21)
結果
AC  
実行時間 133 ms / 2,000 ms
コード長 446 bytes
コンパイル時間 3,272 ms
コンパイル使用メモリ 72,692 KB
実行使用メモリ 56,044 KB
最終ジャッジ日時 2023-09-02 08:11:30
合計ジャッジ時間 5,287 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,596 KB
testcase_01 AC 123 ms
55,560 KB
testcase_02 AC 131 ms
55,376 KB
testcase_03 AC 133 ms
55,848 KB
testcase_04 AC 122 ms
55,276 KB
testcase_05 AC 121 ms
56,044 KB
testcase_06 AC 122 ms
55,608 KB
testcase_07 AC 122 ms
55,280 KB
testcase_08 AC 121 ms
55,548 KB
testcase_09 AC 123 ms
55,284 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class to {

  public static void main(String[] args){

    Scanner input = new Scanner(System.in);
    String scr = input.nextLine();

    String[]num = scr.split(" ");
    int i = 1;

    for(i = 1; i<10; i++){
      int a = Integer.parseInt(num[i-1]);//数値に変換
      if(i!=a){
        System.out.println(a-1);
        break;
      }else if(a==9){
        System.out.println("10");
      }
    }

  }

}
0