Submission #20830

# Submission time Handle Problem Language Result Execution time Memory
20830 2017-02-24T07:44:53 Z Namnamseo 채점 시스템 (OJUZ11_judge) C++14
100 / 100
49 ms 2020 KB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pp;
void read(int& x){ scanf("%d",&x); }
void read(ll& x){ scanf("%lld",&x); }
template<typename T,typename... Args>
void read(T& a,Args&... b){ read(a); read(b...); }
#define all(x) (x).begin(),(x).end()
#define pb push_back

int main()
{
    int t; read(t); for(;t--;){
    	ll man, cur;
    	read(cur, man);
    	ll high = 10;
    	while(high <= cur) high *= 10;
    	int ans=0;
    	while(true){
			if(cur + high > man) break;
			++ans;
			high *= 10;
    	}
    	printf("%d\n", ans);
    }
    return 0;
}

Compilation message

judge.cpp: In function 'void read(int&)':
judge.cpp:5:34: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
 void read(int& x){ scanf("%d",&x); }
                                  ^
judge.cpp: In function 'void read(ll&)':
judge.cpp:6:35: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
 void read(ll& x){ scanf("%lld",&x); }
                                   ^
# Verdict Execution time Memory Grader output
1 Correct 26 ms 2020 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 26 ms 2020 KB Output is correct
2 Correct 36 ms 2020 KB Output is correct
3 Correct 39 ms 2020 KB Output is correct
4 Correct 33 ms 2020 KB Output is correct
5 Correct 36 ms 2020 KB Output is correct
6 Correct 36 ms 2020 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 26 ms 2020 KB Output is correct
2 Correct 36 ms 2020 KB Output is correct
3 Correct 39 ms 2020 KB Output is correct
4 Correct 33 ms 2020 KB Output is correct
5 Correct 36 ms 2020 KB Output is correct
6 Correct 36 ms 2020 KB Output is correct
7 Correct 43 ms 2020 KB Output is correct
8 Correct 49 ms 2020 KB Output is correct
9 Correct 43 ms 2020 KB Output is correct
10 Correct 43 ms 2020 KB Output is correct
11 Correct 36 ms 2020 KB Output is correct