# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
322378 |
2020-11-14T14:36:12 Z |
fgojko |
Savrsen (COCI17_savrsen) |
C++14 |
|
1336 ms |
39532 KB |
#include <iostream>
#include <cmath>
#include <vector>
using namespace std;
int main()
{
int a, b;
cin >> a >> b;
vector<int> vec(b+1, 1);
vec[1] = 0;
for(int i = 2; i <= b/2; ++i){
for(int j = i*2; j <= b; j += i){
vec[j] += i;
}
}
int sum = 0;
for(int i = a; i <= b; ++i){
sum += abs(vec[i] - i);
}
cout << sum << endl;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
364 KB |
Output is correct |
2 |
Correct |
1 ms |
364 KB |
Output is correct |
3 |
Incorrect |
3 ms |
748 KB |
Output isn't correct |
4 |
Incorrect |
1310 ms |
39512 KB |
Output isn't correct |
5 |
Incorrect |
1336 ms |
39512 KB |
Output isn't correct |
6 |
Incorrect |
1314 ms |
39532 KB |
Output isn't correct |
7 |
Incorrect |
1186 ms |
36460 KB |
Output isn't correct |
8 |
Incorrect |
220 ms |
10348 KB |
Output isn't correct |