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 sunmoonstar_love at 2005-07-20 11:56:27 on Problem 1730
#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:
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