#include #include #include using namespace std; #define int long long #define REP(i,m,n) for(int i=(m);i<(n);i++) #define rep(i,n) REP(i,0,n) #define pb push_back #define all(a) a.begin(),a.end() #define rall(c) (c).rbegin(),(c).rend() #define mp make_pair #define endl '\n' typedef long long ll; typedef pair pll; typedef long double ld; const ll inf=1e9+7; const ll mod=1e9+7; ll gcd(ll a,ll b){ if(a>t; while(t){ t--; ll n;cin>>n; ll ans=0; vectorjou(35); jou[1]=n; REP(i,2,33){ REP(j,2,sqrt(n)+1){ ll res=1; rep(k,i){ res*=(ll)j; } if(res<=n)jou[i]++; else break; } } ans+=n*(2*n-1); REP(i,1,33){ REP(j,i+1,33){ if(gcd(i,j)==1){ ll lcm=(ll)i*(ll)j/gcd(i,j); ans+=n/(j/gcd(i,j))*jou[j]*2; } } } cout<