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> 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