#include<bits/stdc++.h>
#define mod 1000000007
using namespace std;
int main(){
int t;
cin >> t;
while(t--){
long long n , i ;
cin >> n;
long long ans = 0;
long long last;
for( i = 1; i*i <= n ; ++i )
ans = (ans + (i * (n/i))%mod)%mod;
--i;
last = n/i;
for( i = 1; i < last ; ++i )
{
long long en = n/i;
long long st = n/(i+1);
long long diff = (en*(en+1)/2 )- (st*(st+1)/2);
ans = (ans + (i*diff)%mod)%mod;
}
cout << ans << endl;
}
return 0;
}
No comments:
Post a Comment