結果
| 問題 | No.253 ロウソクの長さ |
| コンテスト | |
| ユーザー |
vorg101
|
| 提出日時 | 2016-05-10 21:40:32 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 412 bytes |
| 記録 | |
| コンパイル時間 | 84 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 27,864 KB |
| 平均クエリ数 | 6.92 |
| 最終ジャッジ日時 | 2024-07-16 10:07:54 |
| 合計ジャッジ時間 | 9,112 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 RE * 35 |
ソースコード
low = 10
high = pow(10, 9)
mid = (low + high) // 2
count = 0
while True:
if count < 30:
print('?', 10 + count)
print('!', 10 + count + count)
print('?', mid)
r = int(input())
if r == 0:
print('!', mid + count)
break
if r == 1:
low = mid - 1
if r == -1:
high = mid
low -= 1
mid = (low + high) // 2
count += 1
print(count)
vorg101