fork download
  1. #include<bits/stdc++.h>
  2. #include<map>
  3. #include<set>
  4. #include<vector>
  5. #include<stack>
  6. #include<queue>
  7. #include<deque>
  8. #include<string.h>
  9. #define pb(n) push_back(n)
  10. unsigned long long mod=1000000007;
  11. using namespace std;
  12. #define GI ({int t;scanf("%d",&t);t;})
  13. #define all(x) x.begin(),x.end() //sort(all(x))
  14. #define sz(h1) h1.size()
  15. int main()
  16. {
  17.  
  18. int A,B,t;
  19. cin>>t;
  20. while(t--)
  21. {
  22. cin>>A>>B;
  23. int mini=max(A,B);
  24. int maxi=A+B;
  25. cout<<mini<<" "<<maxi<<endl;
  26. }
  27. return 0;
  28. }
Success #stdin #stdout 0s 3344KB
stdin
1
19 17
stdout
19 36