Skip to content

Instantly share code, notes, and snippets.

Created September 6, 2017 13:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/5de75b392483b2475df0782725c4edff to your computer and use it in GitHub Desktop.
Save anonymous/5de75b392483b2475df0782725c4edff to your computer and use it in GitHub Desktop.
for(i=1;i<=T;i++)
{Sum=0;
scanf("%lld",&N);
N2=N/2;
for(k=1;k<=N;k++)
if(k<=N2)
Sum+=((N/k)*k);
else
Sum+=k;
Sum%=1000000007;
printf("%lld\n",Sum);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment