int C(int n, int k) { int i, ret = 1; for(i = 1; i <= n - k; ++i) { ret *= k + i; ret /= i; } return ret; }