# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
884443 |
2023-12-07T11:16:11 Z |
gutzzy |
Savrsen (COCI17_savrsen) |
C++14 |
|
3000 ms |
39716 KB |
#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
long long ans = 0;
vector<int> d(b-1);
for(int i=0;i<b-1;i++){
d[i] = a%(i+1);
}
int s = 0;
for(int i=a;i<=b;i++){
s+=i;
if(i!=1){
for(int j=0;j<i-1;j++){
if(d[j]==0) ans += j+1;
}
}
for(int k=0;k<b-1;k++){
d[k] = (d[k]+1)%(k+1);
}
}
cout << abs(s-ans) << endl;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Incorrect |
7 ms |
348 KB |
Output isn't correct |
3 |
Execution timed out |
3085 ms |
604 KB |
Time limit exceeded |
4 |
Execution timed out |
3036 ms |
39716 KB |
Time limit exceeded |
5 |
Execution timed out |
3040 ms |
39512 KB |
Time limit exceeded |
6 |
Execution timed out |
3050 ms |
39516 KB |
Time limit exceeded |
7 |
Execution timed out |
3066 ms |
36444 KB |
Time limit exceeded |
8 |
Execution timed out |
3024 ms |
10328 KB |
Time limit exceeded |