| ||||||||||
| 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>
__int64 a[105];
int main()
{
__int64 i,n,m,c;
while(scanf("%I64d%I64d",&n,&m)&&n!=0)
{
c=m;
if(m>n/2)
m=n-m;
a[1]=n;
if(n==1)
{printf("%I64d things taken %I64d at a time is 1 exactly.\n",n,c);}
else
{
for(i=2;i<=m;i++)
a[i]=(n-i+1)*a[i-1]/i;
printf("%I64d things taken %I64d at a time is %I64d exactly.\n",n,c,a[m]);
}
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator