Tamflexの貯蔵庫

やる気のない備忘録

aoj 0049

血液型の分類 | Aizu Online Judge

require 'scanf'
sum = {}
sum["A"] = 0
sum["B"] = 0
sum["AB"] = 0
sum["O"] = 0
while line = gets
  n,t = line.split(',').map(&:to_s)
  sum[t.chomp] += 1
end
puts sum["A"]
puts sum["B"]
puts sum["AB"]
puts sum["O"]