#include <bits/stdc++.h>
using namespace std;
#define ll long long
ll cek(ll x){
return x % 9;
}
int main(){
ll q;
cin >> q;
for(ll i = 0; i < q; i++){
ll ans = 0, l, r;
cin >> l >> r;
for(ll i = l; i <= r; i++){
ans += cek(i);
}
cout << ans << endl;
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
2 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
4 |
Execution timed out |
1077 ms |
348 KB |
Time limit exceeded |
5 |
Execution timed out |
1072 ms |
348 KB |
Time limit exceeded |