#!/usr/bin/env ruby buki = ["鉄"]*6 + ["普通"]*3 + ["高級"] occur = Hash.new(0) 100.times do occur[buki.sample] += 1 end p occur