<?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>PE</anon>
    <anon>数学</anon>
    <anon>プログラミング</anon>
  </categories>
  <description>本当は文字をいちいちカウントする必要はありません。例えば、d1000を求めてみましょう。 1桁の数は1〜9だから、9までで9桁です。2桁の数は10〜99の90個あるので、99までで9+180=189桁です。3桁の数は100〜999の900個あるので、999までで9+180+2700=2889桁です。よって、1000桁目は3桁の数のどこかになります。(1000-189)/3 = 270…1だから、999桁目が99+270=369の最後の数字、1000桁目が370の最初の数字、すなわち3になります。 def calc_digit(n): k = 0 m = n while m &gt; 0: k += …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Finamori.hateblo.jp%2Fentry%2F20091228%2Fp1&quot; title=&quot;Project Euler 40（2） - 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>2009-12-28 00:00:00</published>
  <title>Project Euler 40（2）</title>
  <type>rich</type>
  <url>https://inamori.hateblo.jp/entry/20091228/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
