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 |
请帮我看看这个程序为啥w#include<stdio.h> int main() { __int64 s1,s2,s, k,i,j,n; while(scanf("%I64d%I64d",&n,&k)&&n!=0&&k!=0) { s1=1;s2=1;s=1; if(k==0||k==n) printf("1\n"); if(k>n/2) k=n-k; i=0;j=k; while(i<k) { s1*=n; if(s1%j==0) s1=s1/j; else s2*=j; i++; j--; n--; //printf("%I64d%I64d\n",s1,s2); } s=s1/s2; printf("%I64d\n",s); } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator