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

牛!

Posted by iShowFun at 2009-02-24 23:29:50 on Problem 2140
In Reply To:我的一点见地. Posted by:lixiaoyi at 2008-11-14 21:04:43
> #include<iostream.h>
> int main()
> {
> 	int sum,n,x,count;
> 	cin>>x;
> 	sum=0;
> 	count=0;
> 	for(n=0;sum<=x;n++)
> 	{
> 	    sum+=n;
> 		if((x-sum)%(n+1)==0&&(x-sum)/(n+1)!=0)
> 		{
> 		    count++;
> 		}
> 	}
> 	cout<<count;
> }

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