| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
WA的不行了……坚持、、、哪位大侠帮个忙啊#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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator