Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
8 lines (6 sloc) 126 Bytes
class Integer
def choose(num)
(self-num+1..self).inject(1, &:*) / (2..num).inject(1, &:*)
end
end
puts 40.choose(20)