結果

問題 No.305 鍵(2)
ユーザー ぴろず
提出日時 2015-11-27 22:36:47
言語 Java
(openjdk 23)
結果
RE  
実行時間 -
コード長 558 bytes
コンパイル時間 2,381 ms
コンパイル使用メモリ 74,704 KB
実行使用メモリ 72,992 KB
平均クエリ数 2.00
最終ジャッジ日時 2024-07-16 06:35:12
合計ジャッジ時間 6,818 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other RE * 13
権限があれば一括ダウンロードができます

ソースコード

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