Submission #978478

# Submission time Handle Problem Language Result Execution time Memory
978478 2024-05-09T08:56:43 Z vjudge1 Trol (COCI19_trol) C++17
0 / 50
1000 ms 604 KB
#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
1 Incorrect 0 ms 348 KB Output isn't correct
2 Incorrect 1 ms 348 KB Output isn't correct
3 Runtime error 2 ms 604 KB Execution killed with signal 6
4 Execution timed out 1086 ms 436 KB Time limit exceeded
5 Runtime error 2 ms 604 KB Execution killed with signal 6