結果

問題 No.246 質問と回答
ユーザー tcltktcltk
提出日時 2021-01-21 05:22:02
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 71 ms / 2,000 ms
コード長 720 bytes
コンパイル時間 168 ms
コンパイル使用メモリ 10,776 KB
実行使用メモリ 25,772 KB
平均クエリ数 30.90
最終ジャッジ日時 2023-09-23 20:37:09
合計ジャッジ時間 4,200 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
25,616 KB
testcase_01 AC 66 ms
25,772 KB
testcase_02 AC 69 ms
25,604 KB
testcase_03 AC 67 ms
25,508 KB
testcase_04 AC 65 ms
25,340 KB
testcase_05 AC 66 ms
25,152 KB
testcase_06 AC 65 ms
25,456 KB
testcase_07 AC 63 ms
25,664 KB
testcase_08 AC 66 ms
25,292 KB
testcase_09 AC 65 ms
25,664 KB
testcase_10 AC 66 ms
25,264 KB
testcase_11 AC 68 ms
25,544 KB
testcase_12 AC 67 ms
25,016 KB
testcase_13 AC 67 ms
25,464 KB
testcase_14 AC 67 ms
25,512 KB
testcase_15 AC 68 ms
25,468 KB
testcase_16 AC 65 ms
25,120 KB
testcase_17 AC 66 ms
25,276 KB
testcase_18 AC 64 ms
25,656 KB
testcase_19 AC 66 ms
25,300 KB
testcase_20 AC 65 ms
25,200 KB
testcase_21 AC 68 ms
25,632 KB
testcase_22 AC 68 ms
25,192 KB
testcase_23 AC 68 ms
25,464 KB
testcase_24 AC 69 ms
25,268 KB
testcase_25 AC 69 ms
25,140 KB
testcase_26 AC 68 ms
25,636 KB
testcase_27 AC 69 ms
25,424 KB
testcase_28 AC 65 ms
25,352 KB
testcase_29 AC 65 ms
25,536 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#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()
0