답안 #978478

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
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;
}

# 결과 실행 시간 메모리 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