1 #include <stdio.h> 2 #include <string.h> 3 #include <stdlib.h> 4 #include <math.h> 5 #include <iostream> 6 #include <algorithm> 7 #include <climits> 8 #include <queue> 9 #define ll long long 10 11 using namespace std; 12 13 14 const ll MAX = (ll)sqrt(2e9)+1; 15 const ll MOD = 1e9+7; 16 17 ll ok(ll a1, ll an, ll d) 18 { 19 return ((an-a1)/d+1)*(a1+an)/2; 20 } 21 22 void solve() 23 { 24 ll n,k; 25 ll sum = 0; 26 scanf("%lld",&n); 27 k = (ll)sqrt(n); 28 29 for(ll i = 2; i <= k; i++) 30 { 31 sum += i*(n/i-1); 32 if(i < n/i) 33 sum += (i-1) * ok(n/(i+1)+1, n/i, 1); 34 } 35 36 printf("%lld ",sum); 37 } 38 int main(void) 39 { 40 41 ll t,cnt = 0; 42 scanf("%lld",&t); 43 while(t--) 44 { 45 printf("Case %lld: ",++cnt); 46 solve(); 47 } 48 return 0; 49 }