結果
| 問題 |
No.1793 実数当てゲーム
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-12-22 00:06:56 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 414 bytes |
| コンパイル時間 | 198 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 81,920 KB |
| 平均クエリ数 | 2.00 |
| 最終ジャッジ日時 | 2024-09-28 13:21:10 |
| 合計ジャッジ時間 | 3,178 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 18 |
ソースコード
def solve():
def query(x):
print('?', x)
return True if input() == 'Yes' else False
ng = 1222 * pow(10, 72) + 1
ok = 0
while True:
if abs(ng - ok) / abs(ng) <= pow(10, -5):
print('!', ok)
break
mid = (ok + ng) / 2
if query(mid):
ok = mid
else:
ng = mid
for _ in range(int(input())):
solve()