a = (1..10).to_a
b = a.combination(6).to_a
c = a.sample(5)
答案: b.count {|e| (c - e).empty?}
a = (1..10).to_a
b = a.combination(4).to_a
c = a.sample(5)
d = a.sample(4)
答案: c.combination(4).size
d.combination(4).size