here
以后队里的高精度就交给我了。
仔细想想我都主要负责了一些什么奇怪的东西?
数论,计算几何,高精度,思维,规律
???????????????????????????????
ac code
package ac;
import java.util.Scanner;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.text.DecimalFormat;
public class acgo {
static void solve()
{
Scanner sc = new Scanner(System.in);
int k = sc.nextInt();
BigInteger temp = sc.nextBigInteger();
BigInteger l = new BigInteger("0");
BigInteger r = new BigInteger("1");
while(r.pow(k).compareTo(temp)<=0)
{
l=r;
r=r.shiftLeft(1);
}
while(l.add(BigInteger.ONE).compareTo(r)<0)
{
BigInteger m = (l.add(r)).shiftRight(1);
boolean ans = m.pow(k).compareTo(temp)<=0;
if(ans) l=m;
else r=m;
}
System.out.println(l);
}
public static void main(String args[])
{
int T=1;
//Scanner sc = new Scanner(System.in);
for(int i=1;i<=T;i++)
{
solve();
}
}
}