| ||||||||||
| 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 | |||||||||
Help~~~~~找了一个钟头都找不到问题~~~~#include <stdio.h>
#include<math.h>
void main()
{
int p;
double x,r,k;
for(;;)
{
scanf("%lf",&x);
if (fabs(x)<0.000000000000001) break;
for(p=32;p>=2;p--)
{
if (x<0) r=pow(-x,double(1.0/p));
else r=pow(x,double(1.0/p));
modf(r+0.00000000000001,&k);
if (fabs(r-k)<0.00000000000001&&(x>0||(x<0&&p%2))) break;
}
printf("%d\n",p);
}
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator