結果

問題 No.3519 A/B問題
コンテスト
ユーザー 👑 amentorimaru
提出日時 2026-05-01 21:35:37
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 242 ms / 2,000 ms
コード長 516 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 396 ms
コンパイル使用メモリ 85,120 KB
実行使用メモリ 105,760 KB
平均クエリ数 334.00
最終ジャッジ日時 2026-05-01 21:35:49
合計ジャッジ時間 7,241 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import sys
import math
input = sys.stdin.readline
def read_values(): return map(int, input().split())
def read_index(): return map(lambda x: int(x) - 1, input().split())
def read_list(): return list(read_values())
from fractions import Fraction

def main():
  a=1
  mx=10**100
  while a<mx:
    a*=2
  a//=2
  ans=0
  while a>0:
    print("?",1,a,flush=True)
    c=input()
    if c[0]==">" or c[0]=='=':
      ans+=a
    a//=2
  print("!", ans,flush=True)
    
    
      
if __name__ == "__main__":
  main()

    

0