<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>sugarknri</author_name>
  <author_url>https://blog.hatena.ne.jp/sugarknri/</author_url>
  <blog_title>メモ</blog_title>
  <blog_url>https://sugarknri.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>問題はこちら No.378 名声値を稼ごう - yukicoderスキルを使わない場合にk回目のクリアで得られるポイントをa[k]とする。 a[k+1]≦a[k]/2であることから帰納的にa[k]≦N/2^(k-1)とわかる。 よってとなる。 これより帰納的に、1回目にスキルを使うのが最適であることが分かる。 あとは通常時を実際に計算して比較すれば良い long n,m,s; int main(){ scanf(&quot;%ld&quot;,&amp;n); m=2*n; while(n){ s+=n; n/=2; } printf(&quot;%ld&quot;,m-s); return 0; } ところで上で求めた不等式をよくみると、…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsugarknri.hatenablog.com%2Fentry%2F2016%2F06%2F18%2F013337&quot; title=&quot;yukicoder No.378 名声値を稼ごう - メモ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>http://chart.apis.google.com/chart?cht=tx&amp;chl=%5Csum_%7Bk%3D1%7D%5E%5Cinfty%20a_k%5Cleq%5Csum_%7Bk%3D1%7D%5E%5Cinfty%20%5Cfrac%7BN%7D%7B2%5E%7Bk-1%7D%7D%3D2N</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2016-06-18 01:33:37</published>
  <title>yukicoder No.378 名声値を稼ごう</title>
  <type>rich</type>
  <url>https://sugarknri.hatenablog.com/entry/2016/06/18/013337</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
