結果
問題 |
No.3212 SUPER Guess the Number
|
ユーザー |
![]() |
提出日時 | 2025-07-25 22:22:44 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 545 bytes |
コンパイル時間 | 322 ms |
コンパイル使用メモリ | 82,520 KB |
実行使用メモリ | 87,588 KB |
最終ジャッジ日時 | 2025-07-25 22:22:51 |
合計ジャッジ時間 | 6,801 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | TLE * 1 -- * 11 |
ソースコード
def binary_search(f): left,right=0,10**6+1 while right-left>1: mid=(right+left)//2 if f(mid): left=mid else: right=mid return left a = 99999 def ask(x,x_d): print('?', x_d) return int(input()) if abs(a-x) >= abs(a-x_d): print("1") return 1 return 0 def f(x): s_d = x-(s-x) if s_d < 0: s_d -= 1 else: s_d += 1 r=ask(s,s_d) if r == 1: return False return True s = 10**6 a=binary_search(f) print('!', a)