Submission #976428

# Submission time Handle Problem Language Result Execution time Memory
976428 2024-05-06T14:50:31 Z vjudge1 Trol (COCI19_trol) C++17
0 / 50
1000 ms 404 KB
#include <bits/stdc++.h>
using namespace std;


int main()
{
    int q;
    cin>>q;
    for (int i=0;i<q;i++){
        int l,r;
        cin>>l;
        cin>>r;
        int jawab=0;
        for (int j=l;j<=r;j++){
            int p=10;
            int mod;
            int ii=j;
            if (j>10){
            	while(ii>p){
                mod = ii%p;
                jawab += mod;
                p *= 10;
                ii /= p;
				}
			}
            else jawab += j;
        }
        cout<<jawab;
    }
    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Incorrect 2 ms 348 KB Output isn't correct
3 Incorrect 1 ms 348 KB Output isn't correct
4 Execution timed out 1068 ms 404 KB Time limit exceeded
5 Incorrect 0 ms 344 KB Output isn't correct