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:超水!! 0MS就ok 代码共享

Posted by 348854308 at 2010-02-19 21:06:58 on Problem 2853
In Reply To:超水!! 0MS就ok 代码共享 Posted by:z1160y at 2009-05-23 01:52:54
> #include <iostream>
> using namespace std;
> int main()
> {
> 	int N;
> 	double x;
> 	int count=1,sum;
> 	int tempory;
> 	double a1;
> 	cin>>N;
> 	while(count<=N) 
> 	{	cin>>tempory>>x;
> 		sum=0;
> 		for(int n=2;n<=70000;n++)
> 		{
> 			a1=(2.0*x/n-n+1)/2;
> 			if(a1>0&&a1==long(a1))  sum++;
> 			if(a1<=0) break;
> 		}
> 		cout<<count<<" "<<sum<<endl;
> 		count++;
> 	}
> 	return 0;
> }

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