# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
150994 | SeekingOblivion | Savrsen (COCI17_savrsen) | C++14 | 1631 ms | 39544 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
//#include<fstream>
#include<queue>
#include<algorithm>
#include<iostream>
#define fin cin
#define fout cout
using namespace std;
//ifstream fin("date.in");
//ofstream fout("date.out");
int a,b,i,f[10000001],j;
long long sol;
int main()
{
fin>>a>>b;
for(i=1;i<=b;i++)
{
f[i]-=i;
for(j=i*2;j<=b;j+=i)
f[j]+=i;
}
for(i=a;i<=b;i++)
if(f[i]>0) sol+=f[i]; else sol-=f[i];
fout<<sol;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |