結果

問題 No.481 1から10
ユーザー Katooooo
提出日時 2017-02-25 20:12:49
言語 Java
(openjdk 23)
結果
RE  
実行時間 -
コード長 446 bytes
コンパイル時間 4,834 ms
コンパイル使用メモリ 74,424 KB
実行使用メモリ 54,088 KB
最終ジャッジ日時 2024-06-11 15:07:24
合計ジャッジ時間 5,191 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 7 RE * 1
権限があれば一括ダウンロードができます

ソースコード

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(a+1);
      }
    }

  }

}
0