結果
| 問題 |
No.305 鍵(2)
|
| コンテスト | |
| ユーザー |
H20
|
| 提出日時 | 2022-01-02 12:41:31 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 601 bytes |
| コンパイル時間 | 247 ms |
| コンパイル使用メモリ | 82,156 KB |
| 実行使用メモリ | 83,936 KB |
| 平均クエリ数 | 1.00 |
| 最終ジャッジ日時 | 2024-10-11 10:39:11 |
| 合計ジャッジ時間 | 5,006 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 13 |
ソースコード
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()
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
H20