제출 #1253004

#제출 시각아이디문제언어결과실행 시간메모리
1253004fahriegegokaydinTrol (COCI19_trol)C++20
50 / 50
0 ms328 KiB
#include<bits/stdc++.h> #define ll long long int using namespace std; int main() { int Q; cin >>Q; while(Q--){ ll l,r,d; cin>>l>>r; d=(r-l+1)/9; l+=d*9; d*=45; for(;l<=r;l++){ if(l%9==0) d+=9; else d+=l%9; } cout<<d<<"\n"; } }
#Verdict Execution timeMemoryGrader output
Fetching results...