結果
問題 |
No.246 質問と回答
|
ユーザー |
![]() |
提出日時 | 2020-09-18 21:47:38 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 472 bytes |
コンパイル時間 | 152 ms |
コンパイル使用メモリ | 82,436 KB |
実行使用メモリ | 70,928 KB |
平均クエリ数 | 30.00 |
最終ジャッジ日時 | 2024-07-17 06:59:00 |
合計ジャッジ時間 | 4,722 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 30 |
ソースコード
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(max(0,Min-10),Max+10): print("? "+str(i)) sys.stdout.flush() res = int(input()) if res == 1: print("! "+str(i)) exit() sys.stdout.flush() sys.stdout.flush()