# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
384988 | sabbirh654 | Savrsen (COCI17_savrsen) | C++14 | 1298 ms | 39532 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<bits/stdc++.h>
using namespace std;
int main()
{
int a, b;
cin >> a >> b;
b++;
vector <int> v(b);
for(int i = 1; i < b; i++)
{
int j = i + i;
while(j < b)
{
v[j] += i;
j += i;
}
}
long long ans = 0;
for(int i = a; i < b; i++)
ans += abs(v[i] - i);
cout << ans << endl;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |