# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
976080 | vjudge1 | Trol (COCI19_trol) | C++17 | 1085 ms | 348 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>
using namespace std;
int q, l[1005], r[1005], ans[1005];;
int main() {
cin >> q;
for (int i = 0; i < q; i++) {
cin >> l[i] >> r[i];
for (int j = l[i]; j <= r[i]; j++) {
if (j % 9 == 0) {
ans[i] += 9;
} else {
ans[i] += j % 9;
}
}
}
for (int i = 0; i < q; i++) {
cout << ans[i] << endl;
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |