Submission #20429

# Submission time Handle Problem Language Result Execution time Memory
20429 2017-02-11T12:23:25 Z CodingBug(#51, CodingBug) 채점 시스템 (OJUZ11_judge) C++
100 / 100
49 ms 2020 KB
#include <bits/stdc++.h>
using namespace std;
int a,b;

int main(){
//	freopen("input.txt","r",stdin);
	int t;
	scanf("%d",&t);
	while(t--){
		scanf("%d %d",&a,&b);
		if(a==0){
			while(b) b/=10,a++;
			a--;
		}else{
			int k=1e9;
			while(k>b-a) k/=10;
			while(a) k/=10,a/=10;
			while(k) k/=10,a++;
		}
		printf("%d\n",a);
	}
	return 0;
}

Compilation message

judge.cpp: In function 'int main()':
judge.cpp:8:16: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d",&t);
                ^
judge.cpp:10:23: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d %d",&a,&b);
                       ^
# Verdict Execution time Memory Grader output
1 Correct 33 ms 2020 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 33 ms 2020 KB Output is correct
2 Correct 39 ms 2020 KB Output is correct
3 Correct 36 ms 2020 KB Output is correct
4 Correct 36 ms 2020 KB Output is correct
5 Correct 39 ms 2020 KB Output is correct
6 Correct 39 ms 2020 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 33 ms 2020 KB Output is correct
2 Correct 39 ms 2020 KB Output is correct
3 Correct 36 ms 2020 KB Output is correct
4 Correct 36 ms 2020 KB Output is correct
5 Correct 39 ms 2020 KB Output is correct
6 Correct 39 ms 2020 KB Output is correct
7 Correct 46 ms 2020 KB Output is correct
8 Correct 43 ms 2020 KB Output is correct
9 Correct 49 ms 2020 KB Output is correct
10 Correct 46 ms 2020 KB Output is correct
11 Correct 39 ms 2020 KB Output is correct