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 |
acIn Reply To:救命啊!我的程序怎么会超时??? Posted by:xingning001 at 2005-08-31 16:01:52 > #include<stdio.h> > main() > { > _int64 s; > long a[1000],top,n,m,i; > while(1) > { > scanf("%ld%ld",&n,&m); > if(n==0&&m==0) break; > s=1;top=0; > for(i=n+m;i>n;i--) > { > s*=i; > if(s%(i-n)) > a[top++]=(i-n); > else s/=(i-n); > } > for(i=0;i<top;i++) > s/=a[i]; > printf("%I64d\n",s); > } > } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator