結果

問題 No.481 1から10
ユーザー bob___wbob___w
提出日時 2017-02-18 00:42:33
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 2,000 ms
コード長 394 bytes
コンパイル時間 3,665 ms
コンパイル使用メモリ 71,792 KB
実行使用メモリ 56,124 KB
最終ジャッジ日時 2023-08-28 18:26:31
合計ジャッジ時間 5,529 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
56,092 KB
testcase_01 AC 122 ms
55,980 KB
testcase_02 AC 123 ms
55,640 KB
testcase_03 AC 122 ms
55,884 KB
testcase_04 AC 125 ms
56,124 KB
testcase_05 AC 123 ms
55,688 KB
testcase_06 AC 123 ms
55,608 KB
testcase_07 AC 125 ms
55,900 KB
testcase_08 AC 123 ms
55,920 KB
testcase_09 AC 123 ms
56,064 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Test15 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String ss = sc.nextLine();

		String[]s =ss.split(" ");
		int c=1;
		for(int i=1;i<=10;i++){
			int a = Integer.parseInt(s[i-1]);
			if(a!=c){
				System.out.println(a-1);
				break;
			}else if(a==9){
				System.out.println(a+1);
				break;
			}
			c++;
		}
	}
}
0