제출 #1255039

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

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;
}

컴파일 시 표준 에러 (stderr) 메시지

trol.cpp:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 | main()
      | ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...