結果
問題 | No.253 ロウソクの長さ |
ユーザー |
![]() |
提出日時 | 2020-01-30 22:54:09 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 56 ms / 2,000 ms |
コード長 | 441 bytes |
コンパイル時間 | 90 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 27,712 KB |
平均クエリ数 | 31.06 |
最終ジャッジ日時 | 2024-07-17 02:27:25 |
合計ジャッジ時間 | 4,033 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 36 |
ソースコード
def main():def ask(m):print("?",m)ret=int(input())if ret==0:print("!",m+cnt)exit()return retcnt=0if ask(100)==-1:cnt+=1while 1:ask(8)cnt+=1l,r=95,10**9+1cnt=1while l+1<r:m=(l+r)//2res=ask(m)if res==1:l=mif res==-1:r=ml-=1r-=1cnt+=1main()