結果

問題 No.481 1から10
ユーザー KatoooooKatooooo
提出日時 2017-02-25 20:12:49
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 446 bytes
コンパイル時間 7,463 ms
コンパイル使用メモリ 72,100 KB
実行使用メモリ 57,888 KB
最終ジャッジ日時 2023-09-02 08:11:09
合計ジャッジ時間 8,132 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,924 KB
testcase_01 AC 123 ms
56,032 KB
testcase_02 AC 124 ms
56,072 KB
testcase_03 AC 124 ms
57,888 KB
testcase_04 AC 124 ms
55,720 KB
testcase_05 AC 122 ms
55,680 KB
testcase_06 AC 121 ms
55,592 KB
testcase_07 AC 123 ms
55,792 KB
testcase_08 AC 124 ms
55,700 KB
testcase_09 RE -
権限があれば一括ダウンロードができます

ソースコード

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