Updated by
Snippets
Updated by
Created by
Added
codeiq.3177.rb- Ignore whitespace
+ (0..(k = n - m)/max_num).reduce(0) { |s, i| s + [1, -1][i % 2] * combination(m, i) * combination(m + k - 1 - max_num * i, m - 1) }
You can clone a snippet to your computer for local editing. Learn more.