<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>inamori</author_name>
  <author_url>https://blog.hatena.ne.jp/inamori/</author_url>
  <blog_title>inamori’s diary</blog_title>
  <blog_url>https://inamori.hateblo.jp/</blog_url>
  <categories>
    <anon>Scala</anon>
  </categories>
  <description>Problem 9この問題は、ピタゴラス数生成式を使えば速く答えを得ることができます。これを使うと、 a + b + c = 2lm(m + n) となるので、500を素因数分解して約数を生成して、その一方の約数の約数を生成して条件にあてはまるか見ればよいです。 type 素因数分解された形は素数と指数のペアのリストと考えると、List[(Int,Int)]という型になりますが、長いので別名をつけましょう。別名はtypeでつけられます。 type Facts = List[(Int,Int)] groupBy Pythonのgroupbyは素因数分解にうってつけの関数です。 from iter…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Finamori.hateblo.jp%2Fentry%2F20110528%2Fp2&quot; title=&quot;ScalaでProject Euler（17） - inamori’s diary&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2011-05-28 00:00:01</published>
  <title>ScalaでProject Euler（17）</title>
  <type>rich</type>
  <url>https://inamori.hateblo.jp/entry/20110528/p2</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
