# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
976415 |
2024-05-06T14:37:12 Z |
vjudge1 |
Trol (COCI19_trol) |
C++17 |
|
1 ms |
600 KB |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
int q;
cin >> q;
while (q--) {
ll l, r;
cin >> l >> r;
int ans = 0;
ll selisih = (r-l)/9;
int sisa = (r-l)%9;
int hah = l%9;
for (int i=hah;i<=8+hah;i++) {
ans += i*selisih;
}
for (int i=hah;i<=(hah)+sisa;i++) {
ans += i;
}
cout << ans << endl;
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
600 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
500 KB |
Output isn't correct |
4 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
5 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |