<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>yokoyantech</author_name>
  <author_url>https://blog.hatena.ne.jp/yokoyantech/</author_url>
  <blog_title>紙一重の積み重ね</blog_title>
  <blog_url>https://www.yokoyan.net/</blog_url>
  <categories>
    <anon>プログラミング</anon>
    <anon>ruby</anon>
  </categories>
  <description>はじめに AtCoderの問題をいろいろやっている中で、多重配列について迷ったのでメモ。 やりたいこと 多重配列の中身を1行ずつ改行して表示したい。 実現方法 joinメソッドを使う。 docs.ruby-lang.org 実装例 $ irb 2.4.0 :001 &gt; H,W=3,4 =&gt; [3, 4] 2.4.0 :002 &gt; out = Array.new(H).map{ Array.new(W,&quot;.&quot;)} =&gt; [[&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;], [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;], [&quot;.&quot;, &quot;.&quot;, &quot;.&quot;, &quot;.&quot;]] 2.4.0 :003 &gt; out.each …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.yokoyan.net%2Fentry%2F2018%2F04%2F18%2F131500&quot; title=&quot;【Ruby】多重配列の中身を1行ずつ改行して表示したい - 紙一重の積み重ね&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>https://cdn.blog.st-hatena.com/images/theme/og-image-1500.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2018-04-18 13:15:00</published>
  <title>【Ruby】多重配列の中身を1行ずつ改行して表示したい</title>
  <type>rich</type>
  <url>https://www.yokoyan.net/entry/2018/04/18/131500</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
