Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

怎么会超时呢???

Posted by 460002326 at 2014-01-19 21:33:04 on Problem 2249
#include<stdio.h>
int main()
{
	double n,k,i,j,sum;
	while(scanf("%lf%lf",&n,&k))
	{
		if(n==0&&k==0)
			break;
		sum=1;
		for(i=n,j=1;j<=k;i--,j++)
		{
			sum=sum*1.0/j*1.0*i*1.0;
		}
		printf("%.0lf\n",sum);
	}return 0;
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator