# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
975269 | vjudge1 | Trol (COCI19_trol) | C++17 | 1092 ms | 432 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
#define pii pair<int,int>
#define fi first
#define se second
#define int long long
using namespace std;
const int maxn=1e5+5;
signed main() {
int q; cin>>q;
while(q--) {
int l,r; cin>>l>>r;
if(l==r) cout<<l%9<<"\n";
else {
int ans=0;
for(int i=l; i<=r; i++) {
ans+=i%9;
}
cout<<ans<<"\n";
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |