# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
975589 |
2024-05-05T14:06:07 Z |
vjudge1 |
Trol (COCI19_trol) |
C++17 |
|
1000 ms |
348 KB |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
ios_base::sync_with_stdio(false);
cin.tie(0); cout.tie(0);
int q; cin >> q;
pair<ll, ll>lr;
for(int i = 0; i < q; i++){
cin >> lr.first >> lr.second;
ll ans = 0;
for(ll j = lr.first; j <= lr.second ; j++){
if (j%9==0)ans+=9;
else ans += j%9;
}
cout << ans << endl;
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Execution timed out |
1087 ms |
348 KB |
Time limit exceeded |
5 |
Execution timed out |
1079 ms |
348 KB |
Time limit exceeded |