Problem:


Score : 100 points

Problem Statement

We have two integers: A and B.

Print the largest number among A + B, A - B, and A \times B.

Constraints

All values in input are integers.

-100 \leq A,\ B \leq 100

Input

Input is given from Standard Input in the following format:

A B

Output

Print the largest number among A + B, A - B, and A \times B.

Sample Input 1

-13 3

Sample Output 1

-10

The largest number among A + B = -10, A - B = -16, and A \times B = -39 is -10.

Sample Input 2

1 -33

Sample Output 2

34

The largest number among A + B = -32, A - B = 34, and A \times B = -33 is 34.

Sample Input 3

13 3

Sample Output 3

39

The largest number among A + B = 16, A - B = 10, and A \times B = 39 is 39.



Sample input:
-13 3


Sample output:
-10

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce
#from fractions import gcd
#from math import gcd
import sys
def I(): return int(input())
def Is(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(input())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = float('inf')


a, b = Is()
print(max(a+b, a-b, a*b))

Submission status: Accepted

Solution code:
a , b = list(map(int,input().strip().split()))
print(max([a*b,a+b,a-b]))

Submission status: Accepted

Solution code:

if __name__ == "__main__":
    A, B = [int(a) for a in input().split()]
    print(max([A+B, A-B, A*B]))

Submission status: Accepted

Solution code:
# A - +-x

A, B = map(int, input().split())
print(max(A + B, A - B, A * B))

Submission status: Accepted

Solution code:

A, B = map(int, input().split())

print(max(A+B, A-B, A*B))

Submission status: Accepted

Solution code:
A,B=map(int,input().split())

calc=[]

calc.append(A+B)
calc.append(A-B)
calc.append(A*B)

print(max(calc))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
#%% for atcoder uniittest use
import sys
input= lambda: sys.stdin.readline().rstrip()
sys.setrecursionlimit(10**9)
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
def lispin(t=int):return list(pin(t))
#%%code

def resolve():
    a,b=pin()
    print(max(a+b,a-b,a*b))
#%%submit!
resolve()

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

print(max(A+B,A-B,A*B))

Submission status: Accepted

Solution code:
import sys, heapq

A, B =map(int, input().split())

print(max(A+B, A-B, A*B))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
print(max(a*b,a-b,a+b))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# N = int(input())
# S = input()
A, B = map(int, input().split())
# A = list(map(int, input().split()))
print(max(A + B, A - B, A * B))

Submission status: Accepted

Solution code:
A, B = list(map(int, input().split()))

a = A + B
b = A - B
c = A * B
ans = max(a, b, c)
print(ans)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
ans1 = a + b
ans2 = a - b
ans3 = a * b
print(max(ans1,ans2,ans3))

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
C = [A+B, A-B, A*B]
print(max(C))

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

add = A + B
dec = A - B
rid = A * B

print(max(add, dec, rid))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
pl = a+b
di = a-b
mu = a*b
if pl>=di and pl>=mu:
    print(pl)
elif di>=pl and di>=mu:
    print(di)
else:
    print(mu)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
ans=max(a+b,a-b,a*b)
print(ans)

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
print(max([a+b, a-b, a*b]))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
x=a+b
y=a-b
z=a*b
print(max(x,y,z))

Submission status: Accepted

Solution code:
def main():
    A, B = (int(x) for x in input().split())
    ans = max((A - B), (A + B), A*B)
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
A, B = list(map(int, input().split()))
list = [A+B, A-B, A*B]
print(max(list))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
List=[]
List.append(a+b)
List.append(a-b)
List.append(a*b)
print(max(List))

Submission status: Accepted

Solution code:
A,B=map(int, input().split())
print(max(max(A+B,A-B),A*B))

Submission status: Accepted

Solution code:
a,b = (int(x) for x in input().split())

ans = max([a+b,a-b,a*b])
print(ans)

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
l = [A+B, A-B, A*B]
print(max(l))

Submission status: Accepted

Solution code:
A, B =map(int, input().split())
print(max(A+B, A-B, A*B))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
p, m, a = a+b, a-b, a*b
print(max([p, m, a]))

Submission status: Accepted

Solution code:
Y, Z = map(int, input().split())
print(max([Y + Z, Y - Z, Y * Z]))

Submission status: Accepted

Solution code:
A, B = (int(x) for x in input().split())
N = [A+B, A-B, A*B]
print(max(N))

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

plus = A + B
minus = A - B
cross = A * B
test = [plus, minus, cross]
print(max(test))

Submission status: Accepted

Solution code:
A,B = map( int,input().split())

if A + B >= A - B:
    n = A + B
else:
    n = A - B

if n >= A * B:
    print(n)
else:
    print(A * B)

Submission status: Accepted

Solution code:
x = list(map(int,input().split()))
print(max([x[0]+x[1],x[0]-x[1],x[0]*x[1]]))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
n=[a+b,a*b,a-b]
n.sort()
print(n[-1])

Submission status: Accepted

Solution code:
# 初期入力
import sys
input = sys.stdin.readline
A,B = (int(x) for x in input().split())

sum_ab      =A+B
differ_ab   =A-B
product_ab  =A*B
print(max(sum_ab,differ_ab,product_ab))

Submission status: Accepted

Solution code:
a,b=[int(_) for _ in input().split()]
print(max(a+b,a-b,a*b))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

def main():
    A, B = map(int, open(0).read().split())
    print(max(A + B, A - B, A*B))


main()

Submission status: Accepted

Solution code:

a,b=map(int,input().split())
print(max(a+b,a-b,a*b))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
p = a+b
q = a*b
r = a-b
print(max(p,q,r))

Submission status: Accepted

Solution code:
n,m = (int(x) for x in input().split())
ls = list()
ls.append(n+m)
ls.append(n-m)
ls.append(n*m)
print(max(ls))

Submission status: Accepted

Solution code:
def main():
    A, B = map(int, input().split())
    return max(A+B, A-B, A*B)
print(main())

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
vv = max(x+y, x-y)
vv = max(vv, x*y)
print(vv)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())

x = a + b
y = a - b
z = a * b

print(max(x,y,z))

Submission status: Accepted

Solution code:
A, B = map(int,input().split())
print(max(A+B,A-B,A*B))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print(max(max(a+b,a-b), a*b))

Submission status: Accepted

Solution code:
import sys
from math import ceil, floor, sqrt, sin, cos, pi
from itertools import accumulate, permutations, combinations
from fractions import gcd # 最大公約数
from collections import deque, Counter
from operator import itemgetter
from heapq import heappop,heappush
sys.setrecursionlimit(10**7)
def lcm(x, y): return ((x * y) // gcd(x, y)) # 最小公倍数
# list(map(int, input().split()))

a, b = map(int, input().split())
ans = []
ans.append(a + b)
ans.append(a - b)
ans.append(a * b)
print(max(ans))

Submission status: Accepted

Solution code:
# A - +-x

a, b = map(int, input().split())

print(max(a+b, a-b, a*b))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
print(max([a+b,a-b,a*b]))

Submission status: Accepted

Solution code:
a, b =map(int, input().split())
c = [a+b, a-b, a*b]
print(max(c))

Submission status: Accepted

Solution code:
x = input().split()

n = int(x[0])

m = int(x[1])

print(max(n+m,n-m,n*m))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
l = [a + b, a - b, a * b]
print(max(l))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
print(max(a+b,max(a*b,a-b)))

Submission status: Accepted

Solution code:
# coding: utf-8
a, b = [int(x) for x in input().split()]
print(max(a+b,a-b,a*b))

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

wa = A + B
sa = A - B
se = A * B

print(max(wa, sa, se))

Submission status: Accepted

Solution code:
def main():
    A, B = map(int, input().split())
    print(max(A+B, A-B, A*B))
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a,b=[int(i)for i in input().split()]
print(max(a+b,a-b,a*b))

Submission status: Accepted

Solution code:
A, B = map(str, input().split())
operator= ["+", "-", "*"]
ans = []

for i in operator:
    ans.append(eval(A+i+B))

print(max(ans))

Submission status: Accepted

Solution code:
x = input().split()
a = float(x[0])
b = float(x[1])
la = len(x[0])
lb = len(x[1])
if a < 0 and b > 0:
  a = int(x[0][1:la])
  b = int(b)
  p = - a + b
  m = - a - b
  k = - a * b
elif b < 0 and a > 0:
  a = int(a)
  b = int(x[1][1:lb])
  p = a - b
  m = a + b
  k = a * - b
elif a< 0 and b < 0:
  a = int(x[0][1:la])
  b = int(x[1][1:lb])
  p = - a - b
  m = - a + b
  k = a * b
else:
  a = int(x[0])
  b = int(x[1])
  p = a + b
  m = a - b
  k = a * b
if p >= m and p >= k:
  print(p)
elif m >= p and m >= k:
  print(m)
elif k >= p and k >= m:
  print(k)

Submission status: Accepted

Solution code:
a, b = map(int,(input().split()))

print(max(a+b, a-b, a*b))

Submission status: Accepted

Solution code:
a, b=map(int, input().split())
ans=max(a+b, a-b, a*b)
print(ans)

Submission status: Accepted

Solution code:
a, b = [int(x) for x in input().split()]
ans = max([a + b, a - b, a * b])
print(ans)

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
if a*b >= a+b and a*b >= a-b:
  print(a*b)
elif a+b >= a-b:
  print(a+b)
else:
  print(a-b)

Submission status: Accepted

Solution code:
import math
a,b=map(int,input().split())
print(max(a+b,a-b,a*b))

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

    a, b = map(int, input().split())
    print(max(a+b, a-b, a*b))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a, b = input().split(" ")

a = int(a)
b = int(b)

mul = a*b
sub = a-b
add = a+b

print(max(mul,sub,add))

Submission status: Accepted

Solution code:
x,y = map(int,input().split())

print(max(x+y,x-y,x*y))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
res = []
res.append(a+b)
res.append(a-b)
res.append(a*b)
print(max(res))

Submission status: Accepted

Solution code:
a, b = list(map(int, input().split()))
print(max([a+b, a-b,a*b]))

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
print(max(a+b,max(a-b,a*b)))

Submission status: Accepted

Solution code:
a, b = list(map(int, input().split()))
print(max(a + b, a - b, a * b))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
ans = [a+b, a-b, a*b]
print(max(ans))

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
print(max(max(A+B, A-B), A*B))

Submission status: Accepted

Solution code:
a,b = map(int,input().split())	
maxim = max(a+b,a-b,a*b)
print(maxim)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import sys
# import math
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product                # product(iter, repeat=n)
# from itertools import accumulate             # accumulate(iter[, f])
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from copy import deepcopy                    # to copy multi-dimentional matrix without reference
# from fractions import gcd                    # for Python 3.4


def main():
    mod = 1000000007                  # 10^9+7
    inf = float('inf')
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input(): return sys.stdin.readline().rstrip()
    def ii():  return int(input())
    def mi():  return map(int, input().split())
    def mi_0(): return map(lambda x: int(x)-1, input().split())
    def lmi(): return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():  return list(input())
    
    
    a, b = mi()
    print(max(a+b, a-b, a*b))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a,b=map(int,input().split())

x=a+b
y=a-b
z=a*b

if x>=y and x>=z:
  print(x)
elif y>=x and y>=z:
  print(y)
else:
  print(z)

Submission status: Accepted

Solution code:
#-A - +-x

a, b = map(int, input().split())

listup = [a + b, a - b, a * b]
print(max(listup))

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A, B = MAP()
print(max(A+B, A-B, A*B))

Submission status: Accepted

Solution code:
a = list(map(int, input().split()))
ad = a[0] + a[1]
sb = a[0] - a[1]
mp = a[0] * a[1]
print(max([ad, sb, mp]))

Submission status: Accepted

Solution code:
A,B=[int(x) for x in input().rstrip().split()]
print(max(A+B,A*B,A-B))

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
sum = a+b
diff = a-b
mul = a*b
print(max(max(sum, diff), mul))

Submission status: Accepted

Solution code:
A,B = list(map(int,input().split()))
print(max(A+B,A*B,A-B))

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

print(max((A + B), (A - B), (A * B)))

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 9)
input = sys.stdin.readline
from itertools import permutations,  combinations, accumulate
from functools import *
from collections import deque, defaultdict, Counter
from heapq import heapify, heappop, heappush, heappushpop

INF = float('inf')
NIL = - 1

""" Input
S = input().rstrip()
N = int(input())
A = list(map(int, input().split()))
A = np.array(input().split(), dtype=np.float64)
D = [int(input()) for _ in range(N)]
AB = [[int(x) for x in input().split()] for _ in range(N)]
PX = [[int(x) for x in input().split()] for _ in range(Q)]
"""

A, B = map(int, input().split())
t = A + B
m = A - B
k = A * B

print(max(t, m, k))






# def main():
# if __name__ == '__main__':
#     main()

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
print(max(a[0]+a[1],a[0]-a[1],a[0]*a[1]))

Submission status: Accepted

Solution code:
def main():
    a, b = map(int, input().split())
    res = [(a+b), (a*b), (a-b)]
    print(max(res))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
if A+B>=A-B and A+B>=A*B:
  print(A+B)

elif A-B>=A+B and A-B>=A*B:
  print(A-B)

else:
  print(A*B)

Submission status: Accepted

Solution code:
a, b =map(int, input().split())
print(max(a + b, a- b, a * b))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
p=a+b
mi=a-b
m=a*b
print(max(p,mi,m))

Submission status: Accepted

Solution code:
icase=0
if icase==0:
    a,b=map(int,input().split())
    print(max(a+b,a-b,a*b))

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
A = a+b
B = a-b
C = a*b
D = max(A,B)
print(max(C,D))

Submission status: Accepted

Solution code:
K, N = map(int, input().split())

X = K+N
Y = K-N
Z = K*N

print(max(X,Y,Z))

Submission status: Accepted

Solution code:
A, B = list(map(int,input().split()))
print(max(A + B, A - B, A * B))

Submission status: Accepted

Solution code:
a, b =map(int, input().split())
l=[
  a+b,
  a-b,
  a*b
]
print(max(l))

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

c = [A+B, A-B, A*B]
print(max(c))

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

print(max([A + B, A - B, A * B]))

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
T = A+B
H = A-B
K = A*B
A=[]
A.append(T)
A.append(H)
A.append(K)

print(max(A))

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
ans = max(A + B, A - B, A * B)
print(ans)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
x = a + b
y = a - b
z = a * b
print(max(x, y, z))

Submission status: Accepted

Solution code:
a,b = map(int, input().split())

tasu = a+b
hiku = a-b
kake = a*b

print(max(tasu,hiku,kake))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())

print(max(max(a+b,a-b),a*b))

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
print(str(max(A+B,A-B,A*B)))

Submission status: Accepted

Solution code:
A,B = map(int,input().split())

print(max(A + B, A - B, A * B))

Submission status: Accepted

Solution code:
a = list(map(int, input().split()))

print(max(a[0] + a[1], a[0] - a[1], a[0] * a[1]))

Submission status: Accepted

Solution code:
a,b=input().split()
a = int(a)
b = int(b)
ad = a+b
minus = a-b
cross = a*b
lis = [ad, minus, cross]
print(max(lis))

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
print(max([A+B, A-B, A*B]))

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
 
wa = A+B
sa = A-B
seki = A*B
 
print(max(max(wa,sa), max(sa,seki)))

Submission status: Accepted

Solution code:
a, b= input().split()
a, b= int(a), int(b)
eq1= a+b
eq2= a-b
eq3= a*b

maior= max(eq1, eq2, eq3)
print(maior)

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
print(max((A*B), (A-B), (A+B)))

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

list = [A - B, A + B, A * B]
ans = max(list)

print(ans)

Submission status: Accepted

Solution code:
a, b = map(int, input().split()); print(max(a+b, a-b, a*b))

Submission status: Accepted

Solution code:
#A
a,b = map(int,input().split())
print(max(a+b,a-b,a*b))

Submission status: Accepted

Solution code:
a, b = map(int,input().split())

print(max(a+b,a-b,a*b))

Submission status: Accepted

Solution code:
A,B=map(int,input().split())

x=(A+B)
y=(A-B)
z=(A*B)

if(x>=y and x>z):
    print(x)
elif(y>x and y>z):
    print(y)
else:
    print(z)

Submission status: Accepted

Solution code:
# ANSHUL GAUTAM
# IIIT-D

from math import *
from copy import *
from string import *				# alpha = ascii_lowercase
from random import *				# l.sort(key=lambda l1:l1[0]-l1[1]) => ex: sort on the basis difference
from bisect import *				# bisect_left(arr,x,start,end)  => start and end parameters are temporary
from sys import stdin				# bisect_left return leftmost position where x should be inserted to keep sorted
from sys import maxsize
from operator import *				# d = sorted(d.items(), key=itemgetter(1))
from itertools import *
from collections import Counter		# d = dict(Counter(l))
from collections import defaultdict # d = defaultdict(list)

'''

'''

def solve(l):
	n = len(l)
	

a,b = list(map(int, stdin.readline().rstrip().split()))
print(max(a+b,a-b,a*b))

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

print(max(A + B, A - B, A * B))

Submission status: Accepted

Solution code:
a,b=map(int, input().split())
print(max([a+b,a-b,a*b]))

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
print( max(max(A+B,A-B),A*B) )

Submission status: Accepted

Solution code:
a,b = list(map(int,input().split()))
print(max(a+b,a-b,a*b))

Submission status: Accepted

Solution code:
a,b = map(int, input().split())

print(max(max(a-b,a+b),a*b))

Submission status: Accepted

Solution code:
a,b = [int(x) for x in input().split()]
print(max(a+b,a-b,a*b))

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
print(max([A+B,A-B,A*B]))

Submission status: Accepted

Solution code:

a,b = map(int,input().split())
print(max(a+b,a-b,a*b))

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
x = int(a+b)
y = int(a-b)
z = int(a*b)

l = []
l.append(int(x))
l.append(int(y))
l.append(int(z))
print(max(l))

Submission status: Accepted

Solution code:
n, m = map(int, input().split())
print(max(n + m, n - m, n * m))

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

A,B=nm()
print(max(A*B,A-B,A+B))

Submission status: Accepted

Solution code:
import os, sys, re, math

(A, B) = [int(n) for n in input().split()]

print(max([A + B, A - B, A * B]))

Submission status: Accepted

Solution code:
A, B = [int(s) for s in input().split(' ')]

print(max(A + B, A - B, A * B))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
A, B = [int(s) for s in input().split()]
print(max(A + B, A - B, A * B))

Submission status: Accepted

Solution code:
a, b = list(map(int, input().split(' ')))
hoge = a + b
hoge = max(hoge, a - b)
hoge = max(hoge, a * b)
print(hoge)

Submission status: Accepted

Solution code:
a, b = [int(i) for i in input().split()]
print (max(a + b, a - b, a * b))

Submission status: Accepted

Solution code:
A, B = [int(i) for i in input().split(' ')]

X = A + B
Y = A - B
Z = A * B
print(max(max(X,Y),Z))

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
#A*B,A+B,A-B
i = [A*B,A+B,A-B]
print(max(i))

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

arr = [A+B, A-B, A*B]

print(max(arr))

Submission status: Accepted

Solution code:
a,b = list(map(int, input().split()))
print(max(a+b,a-b,a*b))

Submission status: Accepted

Solution code:
def q1():
    """ A - +-x """
    A, B = (int(i) for i in input().split())
    print(max([A+B, A-B, A*B]))

    
if __name__ == '__main__':
    q1()

Submission status: Accepted

Solution code:
A,B = list(map(int,input().split()))
print(max(A+B,A-B, A*B))

Submission status: Accepted

Solution code:
a, b = map(int,input().split())
print(max(a+b, a-b, a*b))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

print(max([a+b,a-b,a*b]))

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

list_ans = [A+B, A-B, A*B]

print(max(list_ans))

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
L = [A+B, A-B, A*B]
print(max(L))

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
n = max((A + B), (A - B), (A * B))
print(n)

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
N = [ A+B, A-B, A*B ]
print(max(N))

Submission status: Accepted

Solution code:
data = input()
data = data.split(' ')

A = int(data[0])
B = int(data[1])

answer = max(
    A + B,
    A - B,
    A * B,
)

print(answer)

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
print(int(max(A+B, A-B, A*B)))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
A=a*b
B=a-b
C=a+b
D=[A,B,C]
print(max(D))

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
c = a + b 
d = a - b
e = a * b
if (c >= d) and (c >= e):
    print(c)
elif (d >= c) and (d >= e):
    print(d)
else:
    print(e)

Submission status: Accepted

Solution code:
a, b = map(int,input().split())
print(max(a + b, a - b, a * b))

Submission status: Accepted

Solution code:
# ABC 137: A – +-x
a, b = map(int, input().split())
print(max(a + b, a - b, a * b))

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))

def main():
    A, B = input_nums()
    ans = max(A+B, A-B)
    ans = max(ans, A * B)
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from collections import deque
from collections import Counter
from itertools import product, permutations,combinations
from operator import itemgetter
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right, bisect
#pypyではscipy, numpyは使えない
#from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson, minimum_spanning_tree
#from scipy.sparse import csr_matrix, coo_matrix, lil_matrix
#import numpy as np
from fractions import gcd
from math import ceil,floor, sqrt, cos, sin, pi, factorial
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')

def main():
  a, b = map(int, readline().split())
  print(max(a+b, a-b, a*b))
  
  
if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
p,q = input().split()
(a,b) = (int(p), int(q))
a_list = [a+b, a-b,a*b]
print(max(a_list))

Submission status: Accepted

Solution code:
a , b = map(int,input().split())
print(max(a-b,a+b,a*b))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
p=[]
c=a+b
d=a-b
e=a*b
p=[a+b,a-b,a*b]
print(max(p))

Submission status: Accepted

Solution code:
a, b = [int(x) for x in input().split()]
print(max(a+b, a-b, a*b))

Submission status: Accepted

Solution code:
import sys

a, b = map(int, sys.stdin.readline().split())

def main():
    print(max(a+b, a-b, a*b))

if __name__ ==  '__main__':
    main()

Submission status: Accepted

Solution code:
import itertools
import fractions
def main():
  a,b = map(int,input().split())
  ma = a + b
  ma = max(ma,a-b)
  ma = max(ma,a*b)
  print(ma)
if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
A,B = map(int, input().split())
print(max([A+B,A-B,A*B]))

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

print(max(max(A+B,A-B),max(A-B,A*B)))

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
a = A+B
b = A-B
c = A*B
L = [a,b,c]
print(max(L))

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
num = []
num.append(A+B)
num.append(A-B)
num.append(A*B)
num.sort()
print(num[2])

Submission status: Accepted

Solution code:
a, b = [int(i) for i in input().split()]

print(max(a+b, a-b, a*b))

Submission status: Accepted

Solution code:
A, B = map(int, input().split(" "))
print(max(A + B, max(A - B, A * B)))

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
C=max(A+B,A-B,A*B)
print(C)

Submission status: Accepted

Solution code:
# デバッグ用
GBN_DEBUG = False
def dprn(s, i):
    if GBN_DEBUG: print(", " + s + " = " + str(i), end = "")
def dprns(s):
    if GBN_DEBUG: print(", " + s, end = "")
def dprni(i):
    if GBN_DEBUG: print(i, end=" ")
def endl(): 
    if GBN_DEBUG: print('')
def puts(s): print(s)

#本体ここから

#S = input()
#N = int(input())
#S, T = input().split()
A, B = map(int, input().split())
#W = [input() for _ in range(N)]
#A = list(map(int, input().split()))

#GBN_DEBUG = True

s = A + B
d = A - B
p = A * B

ans = max(s, d)
ans = max(ans, p)

print(ans)

Submission status: Accepted

Solution code:
a, b = map(int,input().split())
print(max(a-b,a+b,a*b))

Submission status: Accepted

Solution code:
a, b = map(int,input().split())
x = [a+b, a-b, a*b]
print(max(x))

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

print(max(A+B,A-B, A*B))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print(max(a + b, a * b, a - b))

Submission status: Accepted

Solution code:
A,B=list(map(int,input().split()))
sum=A+B
subtraction=A-B
product=A*B
print(max(sum,subtraction,product))

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
print(max(a + b,a-b,a*b))

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
A = [a+b,a*b,a-b]
print(max(A))

Submission status: Accepted

Solution code:
A,B=map(int, input().split(" "))
print(max([A+B,A-B,A*B]))

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
print(max(A + B, max(A - B, A * B)))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
ans = max(a+b,a-b,a*b)
print(ans)

Submission status: Accepted

Solution code:
def main():
    a, b = map(int, input().split())
    ans = a+b

    if ans < a-b:
        ans = a-b
    if ans < a*b:
        ans = a*b
    print(ans)

main()

Submission status: Accepted

Solution code:
#%%
import sys
def input():
    return sys.stdin.readline().rstrip()

def main():
    A, B = map(int, input().split())

    print(max([A+B,A-B,A*B]))

# %%
if __name__ == '__main__':
    main()

# %%
# from atcoder_test import doTest
# doTest("abc137","a",main)