結果

問題 No.305 鍵(2)
ユーザー TatsuDXTatsuDX
提出日時 2016-10-16 21:53:47
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 656 bytes
コンパイル時間 3,273 ms
コンパイル使用メモリ 72,052 KB
実行使用メモリ 74,180 KB
平均クエリ数 21.62
最終ジャッジ日時 2023-09-23 11:36:16
合計ジャッジ時間 7,938 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 164 ms
71,720 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 151 ms
72,712 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Test {
	public static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		byte[] n = new byte[10];
		System.out.println("0000000000");
		int cnt = sc.nextInt(), tmp;
		String s = sc.next();
		if (cnt == 10) {
			return;
		}
		for (int i = 0; i < 10; i++) {
			for (int j = 1; j < 10; j++) {
				n[i] = (byte)j;
				for (int k = 0; k < 10; k++) {
					System.out.print(n[k]);
				}
				System.out.println();
				tmp = sc.nextInt();
				s = sc.next();
				if (tmp == 10) {
					return;
				}
				if (cnt != tmp) {
					if (cnt > tmp) {
						n[i]--;
					}
					break;
				}
			}
		}
	}
}
0