Submission #715815

# Submission time Handle Problem Language Result Execution time Memory
715815 2023-03-28T06:19:21 Z Dulguun88 Trol (COCI19_trol) C++14
10 / 50
1000 ms 212 KB
# include<bits/stdc++.h>
using namespace std;
int main(){
	unsigned long long int n,sum=0,m=0;
	int a,b;
	cin>>n;
	while(n--){
		cin>>a>>b;
		for(int i=a ; i<=b;i++){
			m=i;
			while(m>0){
				sum+=m%10;
				m/=10;
			}
		}
		cout<<sum<<endl;
		sum=0;
	}
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 1 ms 212 KB Output isn't correct
3 Incorrect 1 ms 212 KB Output isn't correct
4 Execution timed out 1093 ms 212 KB Time limit exceeded
5 Incorrect 1 ms 212 KB Output isn't correct