結果
問題 |
No.305 鍵(2)
|
ユーザー |
![]() |
提出日時 | 2022-01-02 12:42:21 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 609 bytes |
コンパイル時間 | 486 ms |
コンパイル使用メモリ | 81,792 KB |
実行使用メモリ | 76,512 KB |
平均クエリ数 | 69.92 |
最終ジャッジ日時 | 2024-10-11 10:39:54 |
合計ジャッジ時間 | 3,363 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 7 WA * 6 |
ソースコード
import sys import random readline = sys.stdin.readline write = sys.stdout.write flush = 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: break q = [0]*10 for i in range(10): for j in range(10): q[i]=j x = int(''.join(map(str, q))) if query(x)==i+1: break