結果
問題 |
No.246 質問と回答
|
ユーザー |
![]() |
提出日時 | 2020-09-18 21:45:58 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 449 bytes |
コンパイル時間 | 219 ms |
コンパイル使用メモリ | 81,916 KB |
実行使用メモリ | 70,980 KB |
平均クエリ数 | 30.00 |
最終ジャッジ日時 | 2024-07-17 06:58:52 |
合計ジャッジ時間 | 5,082 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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()