#include using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #define _GLIBCXX_DEBUG #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; inline int floorsqrt(ll x) { int ok = 0, ng = 1e9 + 1; while (abs(ok - ng) > 1) { int mid = (ok + ng) / 2; ((ll) mid * mid <= x ? ok : ng) = mid; } return ok; } int main() { int t; cin >> t; while (t--) { ll x; cin >> x; cout << floorsqrt(x) << endl; } return 0; }