結果

問題 No.305 鍵(2)
ユーザー takeya_okinotakeya_okino
提出日時 2019-08-28 21:47:54
言語 Java21
(openjdk 21)
結果
AC  
実行時間 212 ms / 2,000 ms
コード長 758 bytes
コンパイル時間 1,944 ms
コンパイル使用メモリ 73,952 KB
実行使用メモリ 75,040 KB
平均クエリ数 92.62
最終ジャッジ日時 2023-09-24 02:19:50
合計ジャッジ時間 5,657 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 212 ms
72,660 KB
testcase_01 AC 210 ms
72,928 KB
testcase_02 AC 192 ms
71,352 KB
testcase_03 AC 190 ms
73,308 KB
testcase_04 AC 205 ms
72,668 KB
testcase_05 AC 198 ms
70,740 KB
testcase_06 AC 161 ms
72,764 KB
testcase_07 AC 191 ms
70,776 KB
testcase_08 AC 195 ms
72,860 KB
testcase_09 AC 196 ms
72,996 KB
testcase_10 AC 199 ms
75,040 KB
testcase_11 AC 201 ms
72,592 KB
testcase_12 AC 195 ms
72,756 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String ans = "";
    for(int i = 0; i < 10; i++) {
      int s = 0;
      int l = 0;
      for(int j = 0; j < 10; j++) {
        String t = "";
        for(int k = 0; k < 10; k++) {
          if(k == i) {
            t += j;
          } else {
            t += 0;
          }
        }
        System.out.println(t);
        System.out.flush();
        int L = sc.nextInt();
        String str = sc.next();
        if(str.equals("unlocked")) {
          System.exit(0);
        }
        if(l <= L) {
          s = j;
          l = L;
        }
      }
      ans += s;
    }
    System.out.println(ans);
    System.exit(0);
  }
}
0