제출 #975586

#제출 시각아이디문제언어결과실행 시간메모리
975586vjudge1Trol (COCI19_trol)C++17
0 / 50
1088 ms600 KiB
#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;
        int ans = 0;
        for(ll j = lr.first; j <= lr.second ; j++){
            ans += j%9;
        }
        cout << ans << endl;
    }
}
#Verdict Execution timeMemoryGrader output
Fetching results...