fork download
  1. #include <iostream>
  2. #include <cstdio>
  3. #include <algorithm>
  4. using namespace std;
  5.  
  6. int main() {
  7. int t, a, b;
  8. scanf("%d", &t);
  9. while(t--) {
  10. scanf("%d%d", &a, &b);
  11. printf("%d %d\n", max(a, b), a+b);
  12. }
  13. return 0;
  14. }
Success #stdin #stdout 0s 3344KB
stdin
1
19 17
stdout
19 36