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:Please give me some tips!(So easy,but I can't do it very well)In Reply To:Please give me some tips!(So easy,but I can't do it very well) Posted by:caojingkun886 at 2011-07-25 20:30:50 > #include<stdio.h> > int main() > { > int n,m,ans,i,j; > while(1){ > scanf("%d%d",&n,&m); if(m==0&&n==0) break; > ans=1; > for(i=n+m,j=1;i>=m+1;j++,i--) > ans=ans*i/j; > printf("%d\n",ans); > } > return 0; > } > //Time Limit Exceeded Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator