結果
問題 | No.253 ロウソクの長さ |
ユーザー |
![]() |
提出日時 | 2016-05-10 22:37:31 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 58 ms / 2,000 ms |
コード長 | 381 bytes |
コンパイル時間 | 164 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 27,608 KB |
平均クエリ数 | 25.97 |
最終ジャッジ日時 | 2024-07-16 23:41:48 |
合計ジャッジ時間 | 4,224 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 36 |
ソースコード
low = 10high = pow(10, 9)count = 0print('?', 40)if int(input()) == -1:high = 40low = 0count += 1mid = (low + high) // 2while True:print('?', mid)r = int(input())if r == 0:print('!', mid + count)breakif r == 1:low = mid - 1if r == -1:high = midlow -= 1mid = (low + high) // 2count += 1