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

汗,毫无心理准备就AC了~~晕死

Posted by wsj19911101 at 2010-11-24 20:23:19 on Problem 2140
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
    int n;
	cin>>n;
	n*=2;
	double m=n;
	int x=sqrt(m);
	int sum=0;
	for(int i=1;i<=x;i++)if(n%i==0&&(n/i)%2!=i%2)sum++;
	cout<<sum<<endl;
}

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