Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- typedef long long ll;
- #define fast() (ios_base::sync_with_stdio(0),cin.tie(NULL));
- int main()
- {
- fast();
- int t;
- cin>>t;
- while(t--)
- {
- int pc,pr,cc=1,cr=1;
- cin>>pc>>pr;
- cc=pc/9;
- if(pc%9>0)cc++;
- cr=pr/9;
- if(pr%9>0)cr++;
- if(cr<=cc)
- {
- cout<<"1 "<<cr<<endl;
- }
- else cout<<"0 "<<cc<<endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement