# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
20371 | 2017-02-07T09:41:06 Z | 채점 시스템 (OJUZ11_judge) | C++ | 40 ms | 448 KB |
#include <cstdio> #include <algorithm> using namespace std; typedef long long ll; int N; int main(){ scanf("%d",&N); ll a,b; for(int i=0;i<N;i++){ scanf("%lld %lld",&a,&b); ll sum=1,p; for(p=1;p<13;p++){ sum*=10ll; if(sum>a)break; } if(sum>=b){ puts("0"); continue; } if(sum+a>b){ printf("%d\n",p-1); continue; } for(int j=p;j<13;j++){ sum*=10ll; if(sum+a>b){ printf("%d\n",j); break; } } } return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 24 ms | 388 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 24 ms | 388 KB | Output is correct |
2 | Incorrect | 31 ms | 396 KB | Output isn't correct |
3 | Incorrect | 32 ms | 444 KB | Output isn't correct |
4 | Incorrect | 40 ms | 444 KB | Output isn't correct |
5 | Incorrect | 31 ms | 444 KB | Output isn't correct |
6 | Incorrect | 33 ms | 444 KB | Output isn't correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 24 ms | 388 KB | Output is correct |
2 | Incorrect | 31 ms | 396 KB | Output isn't correct |
3 | Incorrect | 32 ms | 444 KB | Output isn't correct |
4 | Incorrect | 40 ms | 444 KB | Output isn't correct |
5 | Incorrect | 31 ms | 444 KB | Output isn't correct |
6 | Incorrect | 33 ms | 444 KB | Output isn't correct |
7 | Incorrect | 36 ms | 444 KB | Output isn't correct |
8 | Incorrect | 36 ms | 444 KB | Output isn't correct |
9 | Incorrect | 37 ms | 444 KB | Output isn't correct |
10 | Incorrect | 38 ms | 444 KB | Output isn't correct |
11 | Incorrect | 35 ms | 448 KB | Output isn't correct |