結果

問題 No.305 鍵(2)
ユーザー ぴろずぴろず
提出日時 2015-11-27 22:36:47
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 558 bytes
コンパイル時間 2,444 ms
コンパイル使用メモリ 71,104 KB
実行使用メモリ 74,240 KB
平均クエリ数 2.00
最終ジャッジ日時 2023-09-23 06:41:17
合計ジャッジ時間 7,793 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

package no304;

import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] s = new char[10];
		Arrays.fill(s, '0');
		for(int i=0;i<10;i++) {
			int max = -1;
			int maxj = 0;
			for(int j=0;j<10;j++) {
				s[i] = (char) ('0' + j);
				System.out.println(String.valueOf(s));
				int match = sc.nextInt();
				if (match > max) {
					max = match;
					maxj = j;
				}
			}
			s[i] = (char) ('0' + maxj);
		}
		System.out.println(String.valueOf(s));
	}

}
0