# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
976193 |
2024-05-06T09:25:26 Z |
vjudge1 |
Trol (COCI19_trol) |
C++17 |
|
1000 ms |
600 KB |
#include <bits/stdc++.h>
using namespace std;
#define debug cout << "here\n";
int main()
{
int q; cin >> q;
while(q--){
long long ans = 0;
int l,r; cin >> l >> r;
while(l%9 != 1 && l <= r) {
if(l%9 == 0) {
ans += 9;
}else
ans += l%9;
l++;
}
while(r%9 != 9 && r > l) {
ans += l%9;
l++;
}
ans += 45 * (r-l+1)/9;
cout << ans << '\n';
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
3 |
Incorrect |
0 ms |
600 KB |
Output isn't correct |
4 |
Execution timed out |
1063 ms |
348 KB |
Time limit exceeded |
5 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |