제출 #975356

#제출 시각아이디문제언어결과실행 시간메모리
975356vjudge1Trol (COCI19_trol)C++17
20 / 50
1093 ms420 KiB
#include <iostream>
using namespace std;
#define ll long long
int memo[1000];
int main() {
   int t;
   cin>>t;
   for(int i=0;i<t;i++){
       ll l,r,temp=0,cnt=0;
       cin>>l>>r;
       
       for(int j=l;j<=r;j++){
           if(j%9==0){
               temp+=9;
           }
           else{
               temp+=(j%9);
           }
       }
       cout<<temp<<"\n";
   }
}

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

trol.cpp: In function 'int main()':
trol.cpp:9:22: warning: unused variable 'cnt' [-Wunused-variable]
    9 |        ll l,r,temp=0,cnt=0;
      |                      ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...