You are viewing a single comment's thread. Return to all comments →
My accepted C# solution:
public static List<int> solve(int n) { var result = new List<BigInteger>(); result.Add(1); var mod = (int)Math.Pow(10, 9); for (var i = 0; i < n; i++) { result.Add(result[i] * (n - i) / (i + 1)); } return result.Select(n => (int)(n % mod)).ToList(); }
Seems like cookies are disabled on this browser, please enable them to open this website
nCr table
You are viewing a single comment's thread. Return to all comments →
My accepted C# solution: