답안 #20363

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
20363 2017-02-07T08:31:08 Z admin 채점 시스템 (OJUZ11_judge) C++14
0 / 100
232 ms 668 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 0;
	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);
		bool ok = 0;
		for(int i=0; i<16; i++){
			if(a + pw[z + i] > b){
				printf("%d\n", i);
				ok = 1;
				break;
			}
		}
		if(!ok) puts("16");
	}
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 200 ms 436 KB Output isn't correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 200 ms 436 KB Output isn't correct
2 Incorrect 182 ms 440 KB Output isn't correct
3 Incorrect 195 ms 496 KB Output isn't correct
4 Incorrect 196 ms 540 KB Output isn't correct
5 Incorrect 196 ms 540 KB Output isn't correct
6 Incorrect 199 ms 540 KB Output isn't correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 200 ms 436 KB Output isn't correct
2 Incorrect 182 ms 440 KB Output isn't correct
3 Incorrect 195 ms 496 KB Output isn't correct
4 Incorrect 196 ms 540 KB Output isn't correct
5 Incorrect 196 ms 540 KB Output isn't correct
6 Incorrect 199 ms 540 KB Output isn't correct
7 Incorrect 224 ms 540 KB Output isn't correct
8 Incorrect 232 ms 540 KB Output isn't correct
9 Incorrect 224 ms 540 KB Output isn't correct
10 Incorrect 228 ms 540 KB Output isn't correct
11 Incorrect 217 ms 668 KB Output isn't correct