fork download
  1. #include <stdio.h>
  2.  
  3. int comb(int n,int r){
  4. if(r==0||r==n)
  5. return 0;
  6. else if (n==0&&r==0)
  7. return 0;
  8. else
  9. return comb(n-1,r-1)+comb(n-1,r);
  10. }
  11. int main(void) {
  12. int x,y;
  13. scanf("%d",&x);
  14. scanf("%d",&y);
  15. printf("%d",comb(x+y,x));
  16. return 0;
  17. }
Success #stdin #stdout 0s 5320KB
stdin
0
0
stdout
Standard output is empty