��Ci</div>
<div>共 10 组数据，第i组数据满足：N&le;max(5,(log<sub>2</sub>i)^4)&nbsp;M&le;10^17,1&le;Ki&le;10,1&le;Ci&le;199。保证有解</div>
</div>
<p></p></div></div></div></div></div><div class="row"><div class="column"><h4 class="ui top attached block header">输出格式</h4><div class="ui bottom attached segment font-content"><div style="position: relative; overflow: hidden;"><div class=content><div>
<div>一个整数，表示小皮球达到目标最少的花费。</div>
</div>
<p>