結果
問題 | No.305 鍵(2) |
ユーザー |
![]() |
提出日時 | 2015-11-27 22:38:26 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 185 ms / 2,000 ms |
コード長 | 574 bytes |
コンパイル時間 | 2,382 ms |
コンパイル使用メモリ | 74,560 KB |
実行使用メモリ | 71,072 KB |
平均クエリ数 | 86.69 |
最終ジャッジ日時 | 2024-07-16 20:46:21 |
合計ジャッジ時間 | 5,173 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 |
ソースコード
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(); sc.next(); if (match > max) { max = match; maxj = j; } if (match == 10) { return; } } s[i] = (char) ('0' + maxj); } } }