puts ['ボ', 'ジョ', 'レ', 'ヌ', 'ボ'].shuffle.map.with_index {|x, i| i > 1 ? x+'ー' : x}.join
Ruby はこういうの書くのが簡単でいいですね。
More than 3 years have passed since last update.
puts ['ボ', 'ジョ', 'レ', 'ヌ', 'ボ'].shuffle.map.with_index {|x, i| i > 1 ? x+'ー' : x}.join
Ruby はこういうの書くのが簡単でいいですね。
Register as a new user and use Qiita more conveniently