#include<bits/stdc++.h>
#define ll long long
#define endl '\n'
using namespace std;
int main(){
int q; cin>>q;
while(q--){
string l, r; cin>>l>>r;
ll m = stoi(l), n = stoi(r), sum=0;
for(ll i=m;i<=n;i++){
sum+=(i%9);
}
cout<<sum<<endl;
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
3 |
Runtime error |
2 ms |
604 KB |
Execution killed with signal 6 |
4 |
Execution timed out |
1088 ms |
432 KB |
Time limit exceeded |
5 |
Runtime error |
3 ms |
600 KB |
Execution killed with signal 6 |