結果
問題 | No.305 鍵(2) |
ユーザー | convexineq |
提出日時 | 2021-01-13 03:54:05 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 118 ms / 2,000 ms |
コード長 | 610 bytes |
コンパイル時間 | 265 ms |
コンパイル使用メモリ | 86,980 KB |
実行使用メモリ | 91,988 KB |
平均クエリ数 | 92.62 |
最終ジャッジ日時 | 2023-09-24 02:50:31 |
合計ジャッジ時間 | 2,769 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 106 ms
87,360 KB |
testcase_01 | AC | 118 ms
91,508 KB |
testcase_02 | AC | 106 ms
91,192 KB |
testcase_03 | AC | 107 ms
91,460 KB |
testcase_04 | AC | 105 ms
91,032 KB |
testcase_05 | AC | 105 ms
91,740 KB |
testcase_06 | AC | 96 ms
86,940 KB |
testcase_07 | AC | 106 ms
91,548 KB |
testcase_08 | AC | 107 ms
91,740 KB |
testcase_09 | AC | 103 ms
91,416 KB |
testcase_10 | AC | 107 ms
91,988 KB |
testcase_11 | AC | 103 ms
91,856 KB |
testcase_12 | AC | 105 ms
91,332 KB |
ソースコード
def get(t): if DEBUG: return sum(ti==ai for ti,ai in zip(t,ANS)), ("unlocked" if t==ANS else "locked") else: return input().split() def ask(t): print(t) sys.stdout.flush() a,b = get(t) return int(a),b DEBUG = 0 ANS = "0100000000" import sys from itertools import product ans = [-1]*10 lst = [0]*10 for i in range(10): cnt,ok = -1,-1 for j in range(10): lst[i] = j x,res = ask("".join(map(str,lst))) if res == "unlocked": exit() if x > cnt: cnt = x ok = j ans[i] = ok lst[i] = 0 ask("".join(map(str,ans)))