<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>moistx</author_name>
  <author_url>https://blog.hatena.ne.jp/moistx/</author_url>
  <blog_title>Logfiles</blog_title>
  <blog_url>https://logfiles.hatenablog.com/</blog_url>
  <categories>
    <anon>UVa</anon>
  </categories>
  <description>解法 問題文に載っているコードのままでも通るが、同じ計算の無駄を省いて少し高速化する。(0.019秒) #include &lt;bits/stdc++.h&gt; using namespace std; int main() { int G[510]; G[0] = 0; for(int i=1; i&lt;501; ++i) { G[i] = G[i-1]; for(int j=1; j&lt;i; ++j) G[i] += __gcd(i, j); } for(int N; scanf(&quot;%d&quot;, &amp;N) &amp;&amp; N;) { printf(&quot;%d\n&quot;, G[N]); } return 0; } メモ for …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Flogfiles.hatenablog.com%2Fentry%2F20140828%2F1409181298&quot; title=&quot;UVa11417 GCD - Logfiles&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>2014-08-28 08:14:58</published>
  <title>UVa11417 GCD</title>
  <type>rich</type>
  <url>https://logfiles.hatenablog.com/entry/20140828/1409181298</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
