s

Code Golf: Choose

Jan 16, 2008

Here is my submission for the Choose challenge. Code size: 88 bytes.

def g(r)(1..r).inject(1){|m,n|m*n}end
x,y=gets.split.map{|n|n.to_i}
p g(x)/(g(y)*g(x-y))

Tagged: rubycode golf