| ||||||||||
| 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 | |||||||||
求大牛指点为什么会WA#include<stdio.h>
int main()
{
int n,k,i,w,t;
_int64 a,b;
scanf("%d%d",&n,&k);
while(1)
{
if ((n==0)&&(k==0)) break;
a=1;
b=1;
if (k>(n/2))
k=n-k;
for (i=n;i>=n-k+1;i--)
a*=i;
for (i=2;i<=k;i++)
b*=i;
printf("%I64d\n",a/b);
scanf("%d%d",&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