Submission #715814

# Submission time Handle Problem Language Result Execution time Memory
715814 2023-03-28T06:18:38 Z Dulguun88 Trol (COCI19_trol) C++14
10 / 50
1000 ms 296 KB
# include<bits/stdc++.h>
using namespace std;
int main(){
	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 1 ms 232 KB Output is correct
2 Incorrect 2 ms 296 KB Output isn't correct
3 Incorrect 1 ms 212 KB Output isn't correct
4 Execution timed out 1091 ms 280 KB Time limit exceeded
5 Incorrect 1 ms 212 KB Output isn't correct