結果
| 問題 |
No.246 質問と回答
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-01-21 05:22:02 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 97 ms / 2,000 ms |
| コード長 | 720 bytes |
| コンパイル時間 | 156 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 28,504 KB |
| 平均クエリ数 | 30.90 |
| 最終ジャッジ日時 | 2024-07-16 20:27:23 |
| 合計ジャッジ時間 | 4,769 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 |
ソースコード
#region Header
#!/usr/bin/env python3
# from typing import *
import sys
import io
import math
import collections
import decimal
import itertools
from queue import PriorityQueue
import bisect
import heapq
def input():
return sys.stdin.readline()[:-1]
sys.setrecursionlimit(1000000)
#endregion
# _INPUT = """# paste here...
# """
# sys.stdin = io.StringIO(_INPUT)
def main():
l = 1
r = 10**9+1
while True:
mid = (l + r) // 2
print(f'? {mid}')
sys.stdout.flush()
a = int(input())
if a == 0:
r = mid
else:
l = mid
if abs(l - r) <= 1:
print(f'! {l}')
return
if __name__ == '__main__':
main()