{"provider_name":"Hatena Blog","published":"2014-08-28 08:14:58","url":"https://logfiles.hatenablog.com/entry/20140828/1409181298","categories":["UVa"],"title":"UVa11417 GCD","provider_url":"https://hatena.blog","blog_url":"https://logfiles.hatenablog.com/","blog_title":"Logfiles","author_url":"https://blog.hatena.ne.jp/moistx/","version":"1.0","width":"100%","description":"\u89e3\u6cd5 \u554f\u984c\u6587\u306b\u8f09\u3063\u3066\u3044\u308b\u30b3\u30fc\u30c9\u306e\u307e\u307e\u3067\u3082\u901a\u308b\u304c\u3001\u540c\u3058\u8a08\u7b97\u306e\u7121\u99c4\u3092\u7701\u3044\u3066\u5c11\u3057\u9ad8\u901f\u5316\u3059\u308b\u3002(0.019\u79d2) #include <bits/stdc++.h> using namespace std; int main() { int G[510]; G[0] = 0; for(int i=1; i<501; ++i) { G[i] = G[i-1]; for(int j=1; j<i; ++j) G[i] += __gcd(i, j); } for(int N; scanf(\"%d\", &N) && N;) { printf(\"%d\\n\", G[N]); } return 0; } \u30e1\u30e2 for \u2026","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Flogfiles.hatenablog.com%2Fentry%2F20140828%2F1409181298\" title=\"UVa11417 GCD - Logfiles\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_name":"moistx","image_url":null,"type":"rich","height":"190"}