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

猪头算法....

Posted by 20053565 at 2007-10-29 14:41:50 on Problem 3100
In Reply To:这种猪头算法也能AC,这题太水了 Posted by:georgezhang at 2007-10-29 14:00:05
> 
> long int root(long int x,int n)
> {
> 	long int d=x;
> 	long int r=1;
> 	for(long int i=2;power(i,n)<=x+d;i++)
> 		if(abs(power(i,n)-x)<d)
> 		{
> 			r=i;
> 			d=abs(power(i,n)-x);
> 		}
> 	return r;
> }

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