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