{"version":"1.0","height":"190","categories":["euler","clojure"],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyarb.hatenadiary.org%2Fentry%2F20100810%2Fp1\" title=\"\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30aa\u30a4\u30e9\u30fc27\u300129\u554f\u76ee - yarb\u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_url":"https://hatena.blog","type":"rich","provider_name":"Hatena Blog","author_name":"yarb","published":"2010-08-10 00:00:00","width":"100%","blog_url":"https://yarb.hatenadiary.org/","url":"https://yarb.hatenadiary.org/entry/20100810/p1","image_url":null,"title":"\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30aa\u30a4\u30e9\u30fc27\u300129\u554f\u76ee","blog_title":"yarb\u306e\u65e5\u8a18","author_url":"https://blog.hatena.ne.jp/yarb/","description":"Clojure\u3067\u3084\u3063\u3066\u307f\u308b\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30aa\u30a4\u30e9\u30fc\u306e29\u554f\u76ee\u306827\u554f\u76ee\u300229\u554f\u76ee\u306f\u300cHow many distinct terms are in the sequence generated by a^b for 2 \u2264 a \u2264 100 and 2 \u2264 b \u2264 100?\u300d\u3068\u3044\u3046\u3082\u306e\u3002 (println (count (distinct (for [a (range 2 101) b (range 2 101)] (Math/pow a b))))) for\u30de\u30af\u30ed\u306e\u4f7f\u3044\u65b9\u308f\u304b\u3063\u305f\u3002\u30b7\u30fc\u30b1\u30f3\u30b9\u3092\u4f5c\u308b\u306e\u306d\u3002\u591a\u91cd\u30eb\u30fc\u30d7\u306e\u62bd\u8c61\u5316\u3082\u7c21\u5358\u3002distinct\u3092uniq\u3068\u540d\u4ed8\u3051\u306a\u304b\u3063\u305f\u306e\u304b\u300227\u554f\u76ee\u306f\u3001\u7d76\u5bfe\u5024\u304c10\u2026"}