<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>inamori</author_name>
  <author_url>https://blog.hatena.ne.jp/inamori/</author_url>
  <blog_title>inamori’s diary</blog_title>
  <blog_url>https://inamori.hateblo.jp/</blog_url>
  <categories>
    <anon>アルゴリズム</anon>
  </categories>
  <description>次の関数について考えます。 これをそのまま書くと、kはnまでで十分だから、 def H(n): return sum(n / k for k in xrange(1, n + 1)) ですね。O(n)の計算量のはずです（nが小さければ）。 さて、この計算を速くできないでしょうか。まず、n = 10で具体的な計算をしてみましょう。 H(n) = 10/1 + 10/2 + 10/3 + 10/4 + 10/5 + 10/6 + 10/7 + 10/8 + 10/9 + 10/10 = 10 + 5 + 3 + 2 + 2 + 1 + 1 + 1 + 1 + 1 です。最後のほう、1が続きますよね…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Finamori.hateblo.jp%2Fentry%2F20120708%2Fp1&quot; title=&quot;上下で計算法を変える - inamori’s diary&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2012-07-08 00:00:00</published>
  <title>上下で計算法を変える</title>
  <type>rich</type>
  <url>https://inamori.hateblo.jp/entry/20120708/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
