답안 #23365

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
23365 2017-05-07T04:55:08 Z gs14004 채점 시스템 (OJUZ11_judge) C++11
0 / 100
246 ms 2020 KB
#include <bits/stdc++.h>
using namespace std;
typedef long long lint;
typedef long double llf;
typedef pair<int, int> pi;

int get_jarisoo(int x){
	if(x == 0) return 1;
	int ans = 0;
	while(x){
		ans++;
		x /= 10;
	}
	return ans;
}

lint pw[18];

int main(){
	pw[0] = 1;
	for(int i=1; i<18; i++)pw[i] = pw[i-1] * 10;
	int q;
	cin >> q;
	while(q--){
		int a, b;
		cin >> a >> b;
		int z = get_jarisoo(a);
		for(int i=0; ; i++){
			if(a + pw[z + i] > b){
				printf("%d\n", i);
				break;
			}
		}
	}
}
# 결과 실행 시간 메모리 Grader output
1 Runtime error 126 ms 2020 KB Execution timed out (wall clock limit exceeded)
# 결과 실행 시간 메모리 Grader output
1 Runtime error 126 ms 2020 KB Execution timed out (wall clock limit exceeded)
2 Runtime error 163 ms 2020 KB Execution timed out (wall clock limit exceeded)
3 Runtime error 149 ms 2020 KB Execution timed out (wall clock limit exceeded)
4 Runtime error 223 ms 2020 KB Execution timed out (wall clock limit exceeded)
5 Correct 163 ms 2020 KB Output is correct
6 Runtime error 169 ms 2020 KB Execution timed out (wall clock limit exceeded)
# 결과 실행 시간 메모리 Grader output
1 Runtime error 126 ms 2020 KB Execution timed out (wall clock limit exceeded)
2 Runtime error 163 ms 2020 KB Execution timed out (wall clock limit exceeded)
3 Runtime error 149 ms 2020 KB Execution timed out (wall clock limit exceeded)
4 Runtime error 223 ms 2020 KB Execution timed out (wall clock limit exceeded)
5 Correct 163 ms 2020 KB Output is correct
6 Runtime error 169 ms 2020 KB Execution timed out (wall clock limit exceeded)
7 Runtime error 246 ms 2020 KB Execution timed out (wall clock limit exceeded)
8 Runtime error 226 ms 2020 KB Execution timed out (wall clock limit exceeded)
9 Runtime error 123 ms 2020 KB Execution timed out (wall clock limit exceeded)
10 Runtime error 159 ms 2020 KB Execution timed out (wall clock limit exceeded)
11 Runtime error 209 ms 2020 KB Execution timed out (wall clock limit exceeded)