{"width":"100%","version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Finamori.hateblo.jp%2Fentry%2F20111104%2Fp1\" title=\"Scala\u3067Project Euler\uff0896\uff09 - 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>","categories":["Scala"],"blog_title":"inamori\u2019s diary","height":"190","author_name":"inamori","author_url":"https://blog.hatena.ne.jp/inamori/","published":"2011-11-04 00:00:00","provider_url":"https://hatena.blog","blog_url":"https://inamori.hateblo.jp/","type":"rich","title":"Scala\u3067Project Euler\uff0896\uff09","provider_name":"Hatena Blog","image_url":null,"url":"https://inamori.hateblo.jp/entry/20111104/p1","description":"\u30a2\u30c3\u30d7\u30df\u30b9\u3067\u9806\u756a\u304c\u9006\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002Problem 623\u4e57\u3057\u3066\u540c\u3058\u6841\u306b\u306a\u308b\u6570\u3092\u7528\u610f\u3057\u3066\u4e26\u3073\u66ff\u3048\u308b\u3068\u540c\u3058\u306b\u306a\u308b\u6570\u3054\u3068\u306b\u5206\u985e\u3057\u307e\u3059\u3002\u540c\u3058\u6570\u306f\u3001\u964d\u9806\u306b\u3067\u3082\u4e26\u3073\u66ff\u3048\u308c\u3070\u3044\u3044\u3067\u3059\u306d\u30028\u306a\u30893\u4e57\u3057\u3066512\u3092\u4e26\u3073\u66ff\u3048\u3066521\u3067\u3059\u3002\u4e26\u3073\u66ff\u3048\u3066\u540c\u3058\u306b\u306a\u308b\u6570\u304c5\u3064\u3042\u308c\u3070\u89e3\u3067\u3059\u3002\u3053\u306e\u5206\u985e\u3068\u3044\u3046\u51e6\u7406\u306f\u975e\u5e38\u306b\u3088\u304f\u4f7f\u3046\u306e\u3067\u3001\u30b8\u30a7\u30cd\u30ea\u30af\u30b9\u3067\u66f8\u3044\u3066\u307f\u307e\u3057\u305f\u3002 def map_cons[K,V](m :Map[K,List[V]], key :K, value :V) = if(m.contains(key)) m(key) = value :: m(key) else m(key) = List(value) def\u2026"}