# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
975369 |
2024-05-05T03:35:38 Z |
vjudge1 |
Trol (COCI19_trol) |
C++17 |
|
1 ms |
440 KB |
#include <iostream>
#define int long long
using namespace std;
int sisa(int x){
int ret = 0;
for(int i = 1; i <=x;i++){
ret += i;
}
return ret;
}
signed main() {
int q;
cin >> q;
while (q--) {
int jawab = 0;
int l, r; cin >> l >> r;
l--;
l = (l / 9) * 45+ sisa(l% 9);
cout << l << endl;
r = (r / 9)* 45 +sisa(r % 9);
cout << r << endl;
jawab = r- l;
cout << jawab << endl;
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
440 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
4 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
5 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |