#include using namespace std; #define pb push_back #define sqr(x) ((x) * (x)) #define fi first #define se second typedef pair ii; const int OO = 1e9 + 7; const int MAXN = 1e6 + 6; long long a[MAXN]; void Inp() { int t; cin >> t; memset(a, -1, sizeof(a)); while (t--) { int n; cin >> n; if (a[n] != -1) { cout << a[n] << '\n'; continue; } long long res = 0; for(int i = 1; i * i * i <= n; ++i) { for(int j = i + 1; j * j <= n / i; ++j) { int k = n / (i * j) - j; // cerr << i << ' ' << j << ' ' << k << '\n'; if (k < 0) break; res += k; } } if (a[n] == -1) a[n] = res; cout << res << '\n'; } } int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); Inp(); return 0; }