#include <stdio.h>
int comb(int a, int b)
{
if (b == 0 || b == a) {
return 1;
}
return comb(a - 1, b) + comb(a - 1, b - 1);
}
int main()
{
int a, b;
printf("comb(%d, %d) = %d\n", a
, b
, comb
(a
, b
)); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgY29tYihpbnQgYSwgaW50IGIpCnsKCWlmIChiID09IDAgfHwgYiA9PSBhKSB7CgkJcmV0dXJuIDE7Cgl9CglyZXR1cm4gY29tYihhIC0gMSwgYikgKyBjb21iKGEgLSAxLCBiIC0gMSk7Cn0KCmludCBtYWluKCkKewoJaW50IGEsIGI7CgoJcHJpbnRmKCJhIGJcbiIpOwoJc2NhbmYoIiVkJWQiLCAmYSwgJmIpOwoJcHJpbnRmKCJjb21iKCVkLCAlZCkgPSAlZFxuIiwgYSwgYiwgY29tYihhLCBiKSk7CglyZXR1cm4gMDsKfQo=