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 |
AC百题留念~100题了。。。 //1942.cpp by ssy #include <iostream> #include <iomanip> using namespace std; double ans,n,m; int main(){ cout<<fixed<<setprecision(0); while(cin>>n>>m){ if(n==0 && m==0) break; if(n>m) swap(n,m); ans=1; for(unsigned i=1;i<=n;i++){ ans=ans*(m+i)/i; } cout<<ans<<endl; } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator