| ||||||||||
| 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 <stdio.h>
#include <math.h>
double x,b,p,tmp;
int main()
{
// freopen("c.in","r",stdin);
// freopen("c.out","w",stdout);
while(scanf("%lf",&x) && x)
{
for(p=32; p>=1; p--)
{
tmp = pow(x,1.0/p);
if(fabs(tmp-round(tmp))<0.000000001)
break;
}
printf("%d\n",(int)p);
}
// fclose(stdin);
// fclose(stdout);
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator