結果
問題 |
No.253 ロウソクの長さ
|
ユーザー |
![]() |
提出日時 | 2016-05-10 21:42:21 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 429 bytes |
コンパイル時間 | 231 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 27,608 KB |
平均クエリ数 | 8.33 |
最終ジャッジ日時 | 2024-07-16 10:07:21 |
合計ジャッジ時間 | 5,183 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 5 RE * 1 TLE * 1 -- * 29 |
ソースコード
low = 10 high = pow(10, 9) mid = (low + high) // 2 count = 0 while True: if count < 30: print('?', 10 + count) if int(input()) == 0: print('!', 10 + count + count) print('?', mid) r = int(input()) if r == 0: print('!', mid + count) break if r == 1: low = mid - 1 if r == -1: high = mid low -= 1 mid = (low + high) // 2 count += 1