# k 乗根の切り捨て/切り上げ def root_floor(n: int, k: int) -> int: l, r = 0, int(pow(n, 1 / k)) + 10000 while r - l > 1: m = (l + r) // 2 if pow(m, k) > n: r = m else: l = m return l for _ in range(int(input())): print(root_floor(int(input()), 2))