{"type":"rich","provider_url":"https://hatena.blog","published":"2009-05-15 00:00:02","blog_title":"inamori\u2019s diary","image_url":null,"width":"100%","categories":["\u6570\u5b66","Python"],"provider_name":"Hatena Blog","height":"190","author_url":"https://blog.hatena.ne.jp/inamori/","url":"https://inamori.hateblo.jp/entry/20090515/p3","blog_url":"https://inamori.hateblo.jp/","version":"1.0","description":"\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30aa\u30a4\u30e9\u30fc http://projecteuler.net/index.php Q129. 1\u304ck\u500b\u7d9a\u304f\u6570R(k)\u3092\u8003\u3048\u308b\u3002\u4f8b\u3048\u3070\u3001R(6) = 111111\u3002\u3053\u308c\u3089\u3092n\u304c\u6700\u521d\u306b\u5272\u308a\u5207\u308c\u308b\u306e\u304cR(k)\u3060\u3068\u3057\u305f\u3068\u304d\u3001A(n) = k\u3068\u66f8\u304f\u3002A(n)\u304c\u6700\u521d\u306b100\u4e07\u3092\u8d85\u3048\u308bn\u3002 \u554f\u984c\u3092\u898b\u305f\u3068\u304d\u9014\u65b9\u3082\u306a\u3044\u8a08\u7b97\u3060\u3068\u601d\u3063\u305f\u304c\u3001\u30b8\u30e7\u30ae\u30f3\u30b0\u3057\u306a\u304c\u3089\u8003\u3048\u3066\u3044\u305f\u3089\u305d\u3046\u3067\u3082\u306a\u3044\u3053\u3068\u304c\u308f\u304b\u3063\u305f\u3002 R(k) = (10k - 1)/9\u3060\u304b\u3089\u300110k \u2261 1(mod n)\u306a\u3089R(k)\u306fn\u3067\u5272\u308a\u5207\u308c\u308b\u3002\u305f\u3060\u3057\u3001k\u304c3\u306e\u500d\u6570\u306e\u5834\u5408\u306f\u30019n\u306e\u5270\u4f59\u3092\u53d6\u3089\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002\u3079\u304d\u4e57\u306e\u8a08\u7b97\u306f\u5270\u4f59\u3092\u53d6\u308a\u306a\u304c\u3089\u30d0\u30a4\u30ca\u30ea\u6cd5\u3092\u4f7f\u3048\u2026","author_name":"inamori","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Finamori.hateblo.jp%2Fentry%2F20090515%2Fp3\" title=\"Project Euler 129 - inamori\u2019s diary\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","title":"Project Euler 129"}