import java.util.Scanner;
import java.math.*;
/**
* @link http://acm.hdu.edu.cn/showproblem.php?pid=6182
* @author Sycamore
* @date Sep, 15
*/
public class Main {
static int binarySearch(long n){
int l=1,r=18;
while(r-l>1){
int mid=(l+r)/2;
if(BigInteger.valueOf(mid).pow(mid).compareTo(BigInteger.valueOf(n))>0)
r=mid;
else l=mid;
}
return l;
}
public static void main(String args[]) {
Scanner scanner=new Scanner(System.in);
while(scanner.hasNext()){
long n=scanner.nextLong();
System.out.println(binarySearch(n));
}
}
}
转载于:https://www.cnblogs.com/zjnu/p/7528161.html