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 KeyD at 2009-07-18 16:47:58 on Problem 3100
没什么好考虑的
#include<iostream>
#include<cmath>
using namespace std;

int main()
{
	int n,a,b;
	while(cin>>b>>n&&(n+b))
	{
		a=pow(b,(double)1/n);
		if(b-pow((double)a,n)>pow((double)a+1,n)-b)
			a++;
		cout<<a<<endl;
	}
	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