def bsearch(low: int, high: int, fun, is_complement=False) -> int: def pred(x: int) -> bool: return not fun(x) if is_complement else fun(x) lo = low hi = high res = low while lo <= hi: m = (lo + hi) // 2 if pred(m): res = max(res, m) lo = m + 1 else: hi = m - 1 return res + 1 if is_complement else res def solve(): def f(x): return x*x <= N N = int(input()) return bsearch(0, N, f) T = int(input()) for _ in range(T): ans = solve() print(ans)