# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1252998 | fahriegegokaydin | Trol (COCI19_trol) | C++20 | 0 ms | 328 KiB |
#include<bits/stdc++.h>
#define ll long long int
using namespace std;
int main()
{
int Q;
cin >>Q;
while(Q--){
int l,r,d;
cin>>l>>r;
d=(r-l+1)/9;
l+=d*9;
d*=45;
for(;l<=r;l++){
d+=l%9?l%9:9;
}
cout<<d<<"\n";
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |