Skip to content

Instantly share code, notes, and snippets.


chenhongqiao/ Secret

Last active Mar 6, 2021
What would you like to do?
# Read in n as integer
n = int(input())
# Process all n pairs of input
for i in range(n):
# Read in a and b from the same line of input
a, b = input().split()
# Convert a and b from string to integer
a, b = int(a), int(b)
# Print out the larger value of a+b and a*b
print(max(a + b, a * b))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment