Submission #20830

#TimeUsernameProblemLanguageResultExecution timeMemory
20830Namnamseo채점 시스템 (OJUZ11_judge)C++14
100 / 100
49 ms2020 KiB
#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 (stderr)

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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...