結果

問題 No.481 1から10
ユーザー マサマサ
提出日時 2022-02-09 16:18:41
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 350 bytes
コンパイル時間 2,149 ms
コンパイル使用メモリ 71,348 KB
実行使用メモリ 56,136 KB
最終ジャッジ日時 2023-09-07 01:35:31
合計ジャッジ時間 4,456 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,768 KB
testcase_01 AC 124 ms
55,784 KB
testcase_02 AC 128 ms
55,632 KB
testcase_03 AC 122 ms
53,800 KB
testcase_04 AC 123 ms
56,136 KB
testcase_05 AC 128 ms
55,708 KB
testcase_06 AC 123 ms
56,060 KB
testcase_07 AC 126 ms
55,908 KB
testcase_08 AC 125 ms
55,748 KB
testcase_09 AC 128 ms
55,764 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int i = 1;
		for ( ; i <= 9; i++) {
			int n = sc.nextInt();
			if (n == i) {
				continue;
			} else {
				System.out.println(i);
				break;
			}
		}
		if (i == 10) {
			System.out.println(10);
		}
		sc.close();
	}
}
0