# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
975891 |
2024-05-06T02:18:49 Z |
vjudge1 |
Trol (COCI19_trol) |
C++17 |
|
1000 ms |
348 KB |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int q; ll l[105], r[105];
int main(){
cin >> q;
int sum=0;
for(int i=1; i<=q; i++){
cin >> l[i] >> r[i];
for(int j=l[i]; j<=r[i]; j++){
if(l[i] % 9 != 0){
sum += l[i] % 9;
}
else{
sum += l[i] % 10;
l[i] -= l[i] % 10;
sum += l[i] % 9;
}
l[i]++;
}
cout << sum << endl;
sum = 0;
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
4 |
Execution timed out |
1029 ms |
344 KB |
Time limit exceeded |
5 |
Execution timed out |
1046 ms |
348 KB |
Time limit exceeded |