{"title":"\u30cf\u30c3\u30b7\u30e5\u306b\u3088\u308b\u7f8e\u3057\u3044\u30e1\u30e2\u5316\uff08Ruby\uff09","image_url":null,"author_url":"https://blog.hatena.ne.jp/obelisk2/","description":"qiita.com\u5143\u30cd\u30bf\u306f\u3053\u308c\u3067\u3059\u3002 Ruby \u306e\u30cf\u30c3\u30b7\u30e5\u306b\u306f\u3053\u306e\u3088\u3046\u306a\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u4e0e\u3048\u65b9\u304c\u3042\u308a\u307e\u3059\u3002 h = Hash.new {|hash, key| hash[key] = default} \u3053\u308c\u3092\u5229\u7528\u3057\u3066\u3001\u3053\u3093\u306a\u98a8\u306b\u30d5\u30a3\u30dc\u30ca\u30c3\u30c1\u6570\u5217\u3092\u30e1\u30e2\u5316\u3067\u8a08\u7b97\u3067\u304d\u307e\u3059\u3002 fib = Hash.new do |hash, n| hash[n] = if n == 0 or n == 1 n else hash[n - 1] + hash[n - 2] end end fib[100] #=>354224848179261915075 \u304a\u304a\u3001\u3059\u3070\u3089\u3057\u3044\u2026\u3002","url":"https://obelisk.hatenablog.com/entry/2019/04/24/134024","published":"2019-04-24 13:40:24","blog_title":"Camera Obscura","version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fobelisk.hatenablog.com%2Fentry%2F2019%2F04%2F24%2F134024\" title=\"\u30cf\u30c3\u30b7\u30e5\u306b\u3088\u308b\u7f8e\u3057\u3044\u30e1\u30e2\u5316\uff08Ruby\uff09 - Camera Obscura\" 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":"obelisk2","categories":["Ruby"],"blog_url":"https://obelisk.hatenablog.com/","provider_name":"Hatena Blog","width":"100%","type":"rich","provider_url":"https://hatena.blog","height":"190"}