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

Help~~~~~找了一个钟头都找不到问题~~~~

Posted by test2005 at 2005-04-21 22:41:36 on Problem 1730
#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:
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