#include #include #include #include using namespace std; #define REP(A,B) for(int (A)=0;(A)<(B);(A)++) int main() { int T; scanf("%d", &T); while(T--) { int n; scanf("%d", &n); long long ans = 0; for(int a = 1; a*a*a < n; a++) { int bcMax = n/a; for(int b = a+1; b*b < bcMax; b++) { int cMax = bcMax/b; if(cMax > b) { ans += cMax-b; } } } printf("%lld\n", ans); } return 0; }