#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl "\n"
using namespace std;
int a, b;
int arr[10000005];
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
for(int i = 1;i<=10000000;i++)
{
for(int j = 2*i;j<=10000000;j+=i)
arr[j]-=i;
}
ll ans = 0;
for(int i = a;i<=b;i++)
{
ans+=abs(arr[i]+i);
}
cout<<ans;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1435 ms |
39512 KB |
Output isn't correct |
2 |
Incorrect |
1407 ms |
39552 KB |
Output isn't correct |
3 |
Incorrect |
1349 ms |
39544 KB |
Output isn't correct |
4 |
Incorrect |
1368 ms |
39544 KB |
Output isn't correct |
5 |
Incorrect |
1357 ms |
39544 KB |
Output isn't correct |
6 |
Incorrect |
1362 ms |
39516 KB |
Output isn't correct |
7 |
Incorrect |
1338 ms |
39544 KB |
Output isn't correct |
8 |
Incorrect |
1340 ms |
39424 KB |
Output isn't correct |