제출 #971572

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

int main(){
	int q,l,r,count;
	cin>>q;

	while(q--){
		count=0;
		cin>>l>>r;
		for(int i =l; i<=r;i++){
			if(i%9 == 0) count+=9;
			else count += (i % 9);
		}
		cout<<count<<endl;
	}
}
#Verdict Execution timeMemoryGrader output
Fetching results...