|
|
вернуться в форумWHY WA ON TEST #7 Maybe I need to use bignum but I am not sure if it is really necesary to use bignum or not...maybe my code has another error here is my code: #include <stdio.h> long long cmb[100][100],res; c(n,k){ int i,j; for(i=0;i<=n;i++){ cmb[i][0]=1; cmb[i][i]=1; } for(i=1;i<=n;i++) for(j=1;j<=k;j++) cmb[i][j]=cmb[i-1][j-1] + cmb[i-1][j]; return cmb[n][k]; } int main(){ int n,a,b; scanf("%d %d %d",&n,&a,&b); res=c(n+a,a)*c(n+b,b); printf("%I64d\n",res); return 0; } thanks for reading bye |
|
|