| ||||||||||
| 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 | |||||||||
What's wrong?#include <stdio.h>
#include <math.h>
double a;
unsigned int N;
int main (){
short i;
while ( scanf ( "%d", &N ) ){
if (!N) break;
for (i=31, a=0; i>=1; i--){
a=pow ( N, (double)1/i );
if ((int)a && fabs ( a-(int)a )<=0.0000001) break;
}
printf ( "%d\n", i );
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator