Created
September 5, 2017 14:47
-
-
Save anonymous/0693c205d3e13ddb17d96eb8a6808687 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(void) | |
{ | |
int T,i; | |
unsigned long long Sum,N,k; | |
scanf("%d",&T); | |
for(i=1;i<=T;i++) | |
{Sum=0; | |
scanf("%llu",&N); | |
for(k=1;k<=N/2;k++) | |
Sum+=((N/k)*k); | |
for(k;k<=N;k++) | |
Sum+=k; | |
Sum%=1000000007; | |
printf("%llu\n",Sum); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment