设计函数int sqrt(int x)
,计算 x 的平方根。
输入格式
输入一个 整数 x,输出它的平方根。直到碰到文件结束符(EOF
)为止。
输出格式
对于每组输入,输出一行一个整数,表示输入整数的平方根。
样例输入
1 2 3 4 5 6 7 8 9
样例输出
1 1 1 2 2 2 2 2 3
import math
# try:
# while True:
# t=int(input())
# print(int(math.sqrt(t)))
# except EOFError:
# pass
while True:
try:
t=int(input())
except EOFError:
break
print(int(math.sqrt(t)))