| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1303068 | uranhishig | Trol (COCI19_trol) | C++20 | 1 ms | 572 KiB |
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
int n;
cin >> n;
for (int i = 0; i < n; i++) {
int a, b;
cin >> a >> b;
int ans = (b - a)/9 * 45;
for (int i = a + (b - a)/9 * 9; i <= b; i++) {
ans += (i%9 == 0 ? 9 : i%9);
}
cout << ans << "\n";
}
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
