답안 #23373

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
23373 2017-05-07T08:39:50 Z gs12117 채점 시스템 (OJUZ11_judge) C++
0 / 100
123 ms 2180 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(){
    ios_base::sync_with_stdio(false);
	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){
				cout<<i<<"\n";
				break;
			}
		}
	}
}
# 결과 실행 시간 메모리 Grader output
1 Runtime error 49 ms 2180 KB Execution timed out (wall clock limit exceeded)
# 결과 실행 시간 메모리 Grader output
1 Runtime error 49 ms 2180 KB Execution timed out (wall clock limit exceeded)
2 Runtime error 66 ms 2180 KB Execution timed out (wall clock limit exceeded)
3 Runtime error 69 ms 2180 KB Execution timed out (wall clock limit exceeded)
4 Runtime error 96 ms 2180 KB Execution timed out (wall clock limit exceeded)
5 Runtime error 99 ms 2180 KB Execution timed out (wall clock limit exceeded)
6 Correct 116 ms 2180 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Runtime error 49 ms 2180 KB Execution timed out (wall clock limit exceeded)
2 Runtime error 66 ms 2180 KB Execution timed out (wall clock limit exceeded)
3 Runtime error 69 ms 2180 KB Execution timed out (wall clock limit exceeded)
4 Runtime error 96 ms 2180 KB Execution timed out (wall clock limit exceeded)
5 Runtime error 99 ms 2180 KB Execution timed out (wall clock limit exceeded)
6 Correct 116 ms 2180 KB Output is correct
7 Runtime error 83 ms 2180 KB Execution timed out (wall clock limit exceeded)
8 Runtime error 113 ms 2180 KB Execution timed out (wall clock limit exceeded)
9 Runtime error 123 ms 2180 KB Execution timed out (wall clock limit exceeded)
10 Runtime error 99 ms 2180 KB Execution timed out (wall clock limit exceeded)
11 Runtime error 63 ms 2180 KB Execution timed out (wall clock limit exceeded)