Problem
给出一个大整数N,求不大于N的平方根的最大整数。例如:N = 8,2 * 2 < 8,3 * 3 > 8,所以输出2。
Solution
Code
from math import *
from decimal import *
getcontext().prec=10**5
a=input()
print(int(Decimal(a).sqrt()))
给出一个大整数N,求不大于N的平方根的最大整数。例如:N = 8,2 * 2 < 8,3 * 3 > 8,所以输出2。
from math import *
from decimal import *
getcontext().prec=10**5
a=input()
print(int(Decimal(a).sqrt()))