| ||||||||||
| 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 | |||||||||
怎么会超时呢???#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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator