Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:why runtime error?In Reply To:why runtime error? Posted by:xiaoyaoxia at 2009-04-06 14:02:15 > #include<stdio.h> > __int64 C(__int64 n,__int64 m) > { > if(m==0) > return 1; > else if(m==1) > return n; > else > return C(n-1,m-1)*n/m; > } > int main() > { > __int64 n,k; > while(scanf("%I64d%I64d",&n,&k)!=EOF) > { > if(n==0&&k==0) > break; > printf("%I64d\n",C(n,k)); > } > return 0; > } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator