Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:AC百题留念~

Posted by huanghongxun at 2011-11-06 17:29:22 on Problem 1942
In Reply To:AC百题留念~ Posted by:xiyangyang790 at 2011-11-06 16:45:58
> 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;	
> }

DP会爆。

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator