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

WA的不行了……坚持、、、哪位大侠帮个忙啊

Posted by shiming413 at 2005-10-27 13:56:01 on Problem 1730
#include<math.h>
#include <iostream.h>
int main()
{
	double a,b;
	int i,f;
	cin>>a;
	while(a)
	{
		if(a==1)
		{
			cout<<1<<endl;
			cin>>a;
			continue;
		}
		if(a<0)
		{
			f=1;
		    a*=-1;
		}
		else
			f=0;
		i=32;
		while(a!=pow(int(pow(a,1.0/i)),i)&&i>1)
			i--;
		if(f)
			while(i%2==0)
				i/=2;
	    cout<<i<<endl;
	    cin>>a;
	}
}

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