# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
978478 | vjudge1 | Trol (COCI19_trol) | C++17 | 1086 ms | 604 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
#define ll long long
#define endl '\n'
using namespace std;
int main(){
int q; cin>>q;
while(q--){
string l, r; cin>>l>>r;
ll m = stoi(l), n = stoi(r), sum=0;
ll total=n-m+1, st=m%9-1;
while(total--){
st++;
sum+=st;
}
cout<<sum<<endl;
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |