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> long f(long n,long m) { if(m==1)return n; if(m==0)return 1; else { return (f(n-1,m-1)*n)/m; } } int main() { long n,m; while(scanf("%ld%ld",&n,&m)) { if(n==0&&m==0) { break; } else { if(m>n/2)m=n-m; printf("%ld\n",f(n,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