제출 #1255027

#제출 시각아이디문제언어결과실행 시간메모리
1255027ipeksoysalTrol (COCI19_trol)C++20
20 / 50
1096 ms328 KiB
#include <bits/stdc++.h>
using namespace std;

int main() 
{
    
    int n, a, b, top;
    cin >> n;
    
    for(int i=0; i<n; i++){
      top=0;
      cin>> a >>  b;
      for(int y=b; y>=a; y--){
        if(y%9==0)
          top += 9;
        else
          top += y%9;
      }
      cout << top << "\n";
    }
    
    return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...