結果
問題 |
No.246 質問と回答
|
ユーザー |
![]() |
提出日時 | 2020-09-18 21:43:20 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 439 bytes |
コンパイル時間 | 173 ms |
コンパイル使用メモリ | 81,748 KB |
実行使用メモリ | 71,040 KB |
平均クエリ数 | 30.00 |
最終ジャッジ日時 | 2024-07-17 06:58:47 |
合計ジャッジ時間 | 4,778 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 WA * 21 |
ソースコード
import sys Max=10**9+7 Min=0 while Max - Min>4: Mid = (Max + Min)//2 print("? "+str(Mid)) #exit() sys.stdout.flush() res = int(input()) #print(res) if res == 1: Min=Mid else: Max=Mid #print(Max,Min) for i in range(Min,Max+10): print("? "+str(i)) sys.stdout.flush() res = int(input()) if res == 1: print("! "+str(i)) exit() sys.stdout.flush()