| ||||||||||
| 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:帮忙看看我这程序吧~~~哪儿有问题啊~~大虾帮忙In Reply To:帮忙看看我这程序吧~~~哪儿有问题啊~~大虾帮忙 Posted by:snowfall at 2008-03-22 21:16:44 > #include<stdio.h>
> main()
> {
> double sum;
> unsigned long i,k,n;
> scanf("%ld %ld",&n,&k);
> while(n!=0)
> {
> if(k>n/2) k=n-k;
> sum=n/k;
>
> for(i=1;i<k;i++)
> { sum=sum/(k-i);
> sum=sum*(n-i);
> }
>
> printf("%.0f\n",sum);
> scanf("%ld %ld",&n,&k);
> }
> }
你这直接就有问题.先要保证整除.
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator