for i in xrange(input()):
b,a = raw_input().split()
if len(a) <= len(b):
print 0
continue
cnt = len(a) - len(b) - 1
b = '1' + '0' * cnt + b
if int(a) < int(b):
print cnt
else :
print cnt + 1
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
317 ms |
2 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
317 ms |
2 KB |
Output is correct |
2 |
Correct |
168 ms |
2 KB |
Output is correct |
3 |
Correct |
174 ms |
2 KB |
Output is correct |
4 |
Correct |
175 ms |
3 KB |
Output is correct |
5 |
Correct |
168 ms |
3 KB |
Output is correct |
6 |
Correct |
163 ms |
3 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
317 ms |
2 KB |
Output is correct |
2 |
Correct |
168 ms |
2 KB |
Output is correct |
3 |
Correct |
174 ms |
2 KB |
Output is correct |
4 |
Correct |
175 ms |
3 KB |
Output is correct |
5 |
Correct |
168 ms |
3 KB |
Output is correct |
6 |
Correct |
163 ms |
3 KB |
Output is correct |
7 |
Correct |
179 ms |
3 KB |
Output is correct |
8 |
Correct |
174 ms |
3 KB |
Output is correct |
9 |
Correct |
175 ms |
3 KB |
Output is correct |
10 |
Correct |
178 ms |
3 KB |
Output is correct |
11 |
Correct |
317 ms |
3 KB |
Output is correct |