#include <iostream>
using namespace std;

int main() {
    int t;
    cin >> t;

    while (t--) {
        long long n;
        cin >> n;

        long long l = 1;
        long long r = n;
        long long x = 0;

        while (l <= r) {
            long long m = (l + r) / 2;
            
            if (m <= n / m) {
                x = m;
                l = m + 1;
            }
            else {
                r = m - 1;
            }
        }

        cout << x * x << '\n';
    }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: