{"author_name":"inamori","title":"\u30d5\u30a3\u30dc\u30ca\u30c3\u30c1\u6570\u5217","image_url":null,"categories":["PE","\u6570\u5b66","\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0"],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Finamori.hateblo.jp%2Fentry%2F20101002%2Fp1\" title=\"\u30d5\u30a3\u30dc\u30ca\u30c3\u30c1\u6570\u5217 - 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>","url":"https://inamori.hateblo.jp/entry/20101002/p1","blog_url":"https://inamori.hateblo.jp/","blog_title":"inamori\u2019s diary","height":"190","version":"1.0","author_url":"https://blog.hatena.ne.jp/inamori/","width":"100%","provider_name":"Hatena Blog","type":"rich","description":"\u30d5\u30a3\u30dc\u30ca\u30c3\u30c1\u6570\u5217Fn\u306f\u6b21\u306e\u3088\u3046\u306b\u5b9a\u7fa9\u3055\u308c\u307e\u3059\u3002 F1 = 1 F2 = 1 Fn+2 = Fn+1 + Fn F2 = 2\u3068\u3059\u308b\u6d41\u5100\u3082\u3042\u308b\u3088\u3046\u3067\u3059\u3002 \u30d5\u30a3\u30dc\u30ca\u30c3\u30c1\u6570\u5217\u306f\u3044\u308d\u3044\u308d\u306a\u3068\u3053\u308d\u306b\u51fa\u3066\u304f\u308b\u305f\u3081\u304b\u3001Project Euler\u3067\u3082\u3057\u3070\u3057\u3070\u53d6\u308a\u4e0a\u3052\u3089\u308c\u307e\u3059\u3002\u30d5\u30a3\u30dc\u30ca\u30c3\u30c1\u6570\u5217\u3092Python\u3067\u751f\u6210\u3059\u308b\u306b\u306f\u3001F0 = 0\u3068\u8003\u3048\u3066\u3001 def gen_fib(): a, b = 0, 1 while True: yield b a, b = b, a + b n\u9805\u3092\u6c42\u3081\u308b\u306b\u3053\u308c\u3092\u4f7f\u3046\u3068\u3001 N = 100000 print next(islice(gen_fib(), N - 1, None)) n\u9805\u3092\u76f4\u2026","published":"2010-10-02 00:00:00","provider_url":"https://hatena.blog"}