# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
596471 |
2022-07-14T19:08:22 Z |
Hussein3600 |
Trol (COCI19_trol) |
C++14 |
|
1000 ms |
300 KB |
#include<bits/stdc++.h>
using namespace std ;
#define mid (r+l)/2
#define fr(i,n) for(int i=0;i<n;i++)
typedef long long ll ;
ll ans=0 ;
int main()
{
int t ;
cin >> t ;
while(t--)
{
ll r , l ;
cin >> l >> r ;
for(int i=l;i<=r;i++)
{
ll x=i ;
while(x>0)
{
ans+=x%10;
x/=10 ;
}
}
cout<<ans<<endl;
ans=0 ;
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Incorrect |
1 ms |
300 KB |
Output isn't correct |
3 |
Execution timed out |
1085 ms |
212 KB |
Time limit exceeded |
4 |
Execution timed out |
1086 ms |
280 KB |
Time limit exceeded |
5 |
Execution timed out |
1060 ms |
212 KB |
Time limit exceeded |