@m_seki の

I like ruby tooから引っ越し

下降階乗冪

へえ。下降階乗冪っていうのがあるのか。どっちでもいいけど。

class Fact
  ...
  def falling(m, n)
    self[m].div(self[m - n])
  end
end

def nCm(n, m)
  fact = Fact.new
  fact.falling(n, m).div(fact.falling(m, m))
end

p nCm(30, 7)