<?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>Haskell</anon>
  </categories>
  <description>http://projecteuler.net/index.php?section=problems&amp;id=42 三角数の判定は、 (n2 + n) / 2 = m n2 + n - 2m = 0 n = (-1 + √(1 + 8m)) / 2 だから、1 + 8mが平方数かどうか。 sqrtが使えるが、sqrtの引数は実数でなければならないので型変換する必要がある。整数型から変換するのはfromIntegralで、逆はfloorでよい。整数型全般で使えるので、型指定が必要。 int_sqrt :: Int -&gt; Int int_sqrt n = floor (sqrt (fromInteg…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Finamori.hateblo.jp%2Fentry%2F20100212%2Fp2&quot; title=&quot;Project Euler 42 - 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>2010-02-12 00:00:01</published>
  <title>Project Euler 42</title>
  <type>rich</type>
  <url>https://inamori.hateblo.jp/entry/20100212/p2</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
