結果
問題 | No.305 鍵(2) |
ユーザー |
![]() |
提出日時 | 2022-01-02 12:44:01 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 71 ms / 2,000 ms |
コード長 | 625 bytes |
コンパイル時間 | 238 ms |
コンパイル使用メモリ | 82,784 KB |
実行使用メモリ | 77,436 KB |
平均クエリ数 | 54.31 |
最終ジャッジ日時 | 2024-07-17 03:06:36 |
合計ジャッジ時間 | 2,123 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 |
ソースコード
import sysimport randomreadline = sys.stdin.readlinewrite = sys.stdout.writeflush = sys.stdout.flush# クエリ: "? x1 x2" を出力def query(x):s = str(x).zfill(10)write("%s\n" % s)flush()# ジャッジから返される値を取得n,l = readline().strip().split()if l == 'unlocked':exit(0)return int(n)while True:r = random.randint(0, 10**10-1)n = query(r)if n==0:breakq = list(str(r).zfill(10))for i in range(10):for j in range(10):q[i]=jx = int(''.join(map(str, q)))if query(x)==i+1:break