답안 #976461

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
976461 2024-05-06T15:05:37 Z vjudge1 Trol (COCI19_trol) C++17
0 / 50
1000 ms 412 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 (long long 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;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 344 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 1092 ms 412 KB Time limit exceeded
5 Incorrect 0 ms 344 KB Output isn't correct