-
-
Save chenhongqiao/c0fde3f17b9369b855e4e6a63339cd45 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
int main() | |
{ | |
int n; | |
// Read integer n from standard input | |
cin >> n; | |
// Process all n pairs of input | |
for (int i = 0; i < n; i++) | |
{ | |
// Read integer a and b | |
int a, b; | |
cin >> a >> b; | |
// Print the larger value of a*b and a+b to standard output | |
cout << max(a + b, a * b) << endl; | |
} | |
// Remeber to return 0 at the end of your program | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment