| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 968641 | VMaksimoski008 | Trol (COCI19_trol) | C++14 | 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 <iostream>
using namespace std;
using ll = long long;
int main() {
    int q;
    cin >> q;
    while(q--) {
        ll l, r;
        cin >> l >> r;
        ll ans = (r - l + 1) / 9 * 45;
        for(int i=0; i<(r-l+1)%9; i++)
            ans += ((l + i) % 9 == 0 ? 9 : (l + i) % 9);
        cout << ans << '\n';
    }
    return 0;
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
