| ||||||||||
| 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:Re:为什么这样还不过? Posted by:00448067 at 2005-04-25 21:01:33 > 我也老是WA
> #include <iostream.h>
> double cc(double m,double n)
> { if(m<0 || n<0 || m<n) return 0;
> if(m==n) return 1;
> if(n==1) return m;
> else return ( cc(m-1,n)+cc(m-1,n-1) );
> }
> void main()
> {
> double m,n;
> cin >> m >> n;
> while(m!=0 && n!=0)
> {
> cout << (unsigned long)cc(m,n) << endl;
> cin >> m >> n;
> }
> }
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator