| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 977006 | vjudge1 | Trol (COCI19_trol) | C++17 | 1 ms | 600 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>
using namespace std;
#define ll long long
int main(){
    int q;
    cin>>q;
    while (q--){
        ll l,r;
        cin>>l>>r;
        ll a=(r-l+1)/9;
        ll b=a*45;
        for (ll c=l+9*a;c<=r;c++)b+=(c+8)%9+1;
        cout<<b<<'\n';
    }
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
