| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 1264135 | goulthen | Trol (COCI19_trol) | C++20 | 0 ms | 832 KiB | 
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,a,b) for (int i = a; i <= b; ++i)
const int MAXN = 1e5 + 10;
int32_t main() {
	ios_base::sync_with_stdio(0);cin.tie(nullptr);
	int q;cin >> q;
	while (q--) {
		int l,r;cin >> l >> r;
		int s = 0;
		while ((r-l)%9 != 0) {
			s += (l%9==0?9:l%9);
			l++;
		}
		s+=(l%9==0?9:l%9);
		s+=5*(r-l);
		cout << s << '\n';
	}
	return 0;
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
