#include #define maxn 1000050 #define modu 1000000007 using namespace std; typedef long long LL; bool noprime[maxn]; int p[maxn],pnum; LL mu[maxn],sum[maxn]; void predo() { mu[1]=1; for (int i=2;i>1; if (mid*mid<=n) l=mid; else r=mid-1; } return l; } LL n; LL S1(LL x) { x%=modu; return x*(x+1)/2%modu; } LL calc(LL n) { LL ans=0; for (LL i=1,j,t;i<=n;i=j+1) { j=n/(t=n/i); ans+=(S1(j)-S1(i-1)+modu)%modu*(t%modu)%modu; ans%=modu; } return ans; } int main() { predo(); int T; scanf("%d",&T); while (T--) { scanf("%lld",&n); LL ans=0; // for (int k=1;k<=n;++k) { // LL res=0; // for (int d=1;d*k<=n;++d) // res+=k*d*(n/(k*k*d)); // LL tmp=calc(n/(k*k))*k%modu%modu; // cout<