51Nod1166 大数开平方

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()))
posted @ 2019-10-19 18:44  CCWUCMCTS  阅读(136)  评论(0编辑  收藏  举报