| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1340641 | kawhiet | Trol (COCI19_trol) | C++20 | 1 ms | 344 KiB |
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int q;
cin >> q;
while (q--) {
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... | ||||
