static void Main(string[] args) { var num = Input.num; var k = Input.num; var com = new Modulo.Combination(num + k - 1); WriteLine(com.Comb(num + k - 1, k)); }
static void Solve() { var hwab = Input.ar; var com = new Modulo.Combination(hwab[0] + hwab[1]); var res = 0L; for (var i = hwab[3]; i < hwab[1]; i++) { var calc = (long)com.Comb(hwab[0] - hwab[2] + i - 1, i) * com.Comb(hwab[1] - i - 2 + hwab[2], hwab[2] - 1) % Input.MOD; res += calc; res %= Input.MOD; } WriteLine(res); }
static void Main(string[] args) { var nm = Input.ar; if (nm[1] == 1) { WriteLine(1); return; } var dic = Calculation.Factorize(nm[1]); var com = new Modulo.Combination(nm[0] + dic.Values.Max()); var res = 1L; foreach (var val in dic.Values) { res = (res * com.Comb(nm[0] + val - 1, val)) % Input.MOD; } WriteLine(res); }
static long Solve() { var nm = Input.ar; if (nm[1] == 1) { return(1); } var res = 1L; var dic = Calculation.Factorize(nm[1]); var com = new Modulo.Combination(dic.Values.Max() + nm[0]); foreach (var val in dic.Values) { res *= com.Comb(val + nm[0] - 1, val); res %= Input.MOD; } return(res); }