<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>obelisk2</author_name>
  <author_url>https://blog.hatena.ne.jp/obelisk2/</author_url>
  <blog_title>Camera Obscura</blog_title>
  <blog_url>https://obelisk.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
    <anon>数学</anon>
  </categories>
  <description>例えば 48 は、2 * 24, 3 * 16, 4 * 12, 6 * 8 に分けられますね。これを Ruby の Integer#divide2 メソッドとして実装しました。ペアを配列に格納して返します（そのようなペアがなければ、空の配列を返します）。引数に true を取れば、自明な 1 * 48 のようなペアも含みます。 class Integer def divide2(include1=false) ar = [] s = include1 ? 1 : 2 for i in s..(self ** 0.5) ar.push([i, self / i]) if (self % i).…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fobelisk.hatenablog.com%2Fentry%2F2015%2F12%2F04%2F002300&quot; title=&quot;整数を2数の積に分ける/約数を求める - Camera Obscura&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>2015-12-04 00:23:00</published>
  <title>整数を2数の積に分ける/約数を求める</title>
  <type>rich</type>
  <url>https://obelisk.hatenablog.com/entry/2015/12/04/002300</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
