回答編集履歴

1

追記

2017/03/07 10:22

投稿

can110
can110

スコア38266

test CHANGED
@@ -1,4 +1,8 @@
1
+ Zuishinさんの回答を参考にしてみました。(Rubyよく分かりませんが)
2
+
1
- Rubyよく分かりませんが[each_with_index (Enumerable)](http://ref.xaio.jp/ruby/classes/enumerable/each_with_index)を使って以下ではどうでしょうか?
3
+ [each_with_index (Enumerable)](http://ref.xaio.jp/ruby/classes/enumerable/each_with_index)を使って以下ではどうでしょうか?
4
+
5
+ できればワンライナーで収めたい(`s`使いたくありません)が…
2
6
 
3
7
  ```Ruby
4
8