結果

問題 No.3519 A/B問題
コンテスト
ユーザー 👑 amentorimaru
提出日時 2026-05-01 21:35:37
言語 PyPy3
(7.3.23 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 150 ms / 2,000 ms
+ 1µs
コード長 516 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 76 ms
コンパイル使用メモリ 80,768 KB
実行使用メモリ 76,672 KB
平均クエリ数 334.00
最終ジャッジ日時 2026-09-16 16:31:38
合計ジャッジ時間 6,134 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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