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:
A, B = map(int, input().split())

AB_add = A + B
AB_sub = A - B
AB_mul = A * B

AB_list = [AB_add, AB_sub, AB_mul]

print(max(AB_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())
l = [A+B, A-B, A * B]
l.sort(reverse=True)
print(l[0])

Submission status: Accepted

Solution code:
'''
問題：
    整数 A, B があります。

    A + B, A − B, A ×B
    の中で最大の数を出力してください。
'''

'''
制約：
入力は全て整数である。
−100 ≤ A, B ≤ 100
'''

# 標準入力から A, B の値を取得する
a, b = map(int, input().split())

result_list = [a + b, a - b, a * b] # 結果格納用リスト

print(max(result_list))

Submission status: Accepted

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

result = A + B
if result <= A - B:
    result = A - B
if result <= A * B:
    result = A * B

print(result)

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:
# 137a

def atc_137a(input_value: str) -> int:
    A, B = map(int, input_value.split(" "))
    return max(A + B, A - B, A * B)

input_value = input()
print(atc_137a(input_value))

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())

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

Submission status: Accepted

Solution code:

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

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

print(answer)

Submission status: Accepted

Solution code:
# A - +-x

# 標準入力 A B

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

if (A + B) <= (A - B):
    if (A - B) <= (A * B):
        answer = A * B
    else:
        answer = A -B
elif (A + B) <= (A * B):
    answer = A * B
else:
    answer = A + B

print(answer)

Submission status: Accepted

Solution code:
# 和、徐、積の中で最大値を出力する

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

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

print(max(lists))

Submission status: Accepted

Solution code:
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()
def deb(text): print("-------\n{}\n-------".format(text))

INF=10**20
def main():
    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())
p=a+b
x=a*b
m=a-b
if(p>=x and p>=m):
  print(p)
elif(x>=p and x>=m):
  print(x)
else:
  print(m)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 数値の取得
c_list = list(map(int,input().split()))
l_cnt = len(c_list)

# 各計算結果の中で最大値を出力
calc_dic = {"add":int(c_list[0]),
            "sub":int(c_list[0]),
            "mul":int(c_list[0])}
for cnt in range(1,l_cnt,1):
    calc_dic["add"] = calc_dic["add"] + c_list[cnt]
    calc_dic["sub"] = calc_dic["sub"] - c_list[cnt]
    calc_dic["mul"] = calc_dic["mul"] * c_list[cnt]
print(max(calc_dic.values()))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

if a+b>a-b:
    if a+b>a*b:
        print(a+b)
    else:
        print(a*b)
else:
    if a-b>a*b:
        print(a-b)
    else:
        print(a * b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
x = a + b, a - b, a * b  # x=(), x=[], x="" どれも使える？

print(max(x))

Submission status: Accepted

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

Submission status: Accepted

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

# A+B, A−B, A×B の中で最大の数を出力してください。

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

Submission status: Accepted

Solution code:
num1, num2 = map(int, input().split())

max_math = max(num1 + num2, num1 - num2, num1 * num2)

print(max_math)

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:
A, B = map(int, input(). split())

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

Submission status: Accepted

Solution code:
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    A, B = LI()

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

if __name__ == '__main__':
    resolve()

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())
c = A + B
d = A - B
e = A * B
print(max(c,d,e))

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 = 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 = [a, b, c]
print(max(d))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
int_a, int_b = map(int, input().split())
lists_calc = [int_a + int_b, int_a - int_b, int_a * int_b]
print(max(lists_calc))

Submission status: Accepted

Solution code:
import sys


def main():
    input = sys.stdin.buffer.readline
    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 = map(int, input().split())

c = A + B
d = A - B 
e = A * B

F = [c, d, e]

print(max(F))

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:
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


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

    x, y, z = A + B, A - B, A * B

    print(max(x, y, z))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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())
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())
x = A + B
y = A - B
z = A * B
print(max(x, y, z))

Submission status: Accepted

Solution code:
# URL : https://atcoder.jp/contests/abc137/tasks/abc137_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())
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())

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
c=a+b
d=a-b
e=a*b
print(max(c,d,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:
A,B = map(int,input().split())
answer = max(A+B,A-B)
answer = max(answer,A*B)
print(answer)

Submission status: Accepted

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

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

    print(ans)


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())
x=sorted([a+b, a-b, a*b])
print(int(x[-1]))

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
ins = lambda: input().rstrip()
ini = lambda: int(input().rstrip())
inm = lambda: map(int, input().split())
inl = lambda: list(map(int, input().split()))
out = lambda x: print('\n'.join(map(str, x)))

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

Submission status: Accepted

Solution code:
def Input():
    return map(int, input().split(" "))

def main():
    a, b = Input()
    return max(a*b, a-b, a+b)


print(main())

Submission status: Accepted

Solution code:

a, b = map(int, input().split())
x = a + b
y = a - b
z = a * b
O = [x,y,z]
O = sorted(O,reverse=1)
print(O[0])

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())


c = a*b
d = a-b
e = a+b
print(max(max(c,d),e))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 問題：https://atcoder.jp/contests/abc137/tasks/abc137_a

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

if a + b < a - b:
    if a - b < a * b:
        print(a * b)
    else:
        print(a - b)
else:
    if a + b < a * b:
        print(a * b)
    else:
        print(a + b)

Submission status: Accepted

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

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

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 ())
P = A+B
M = A-B
K = A*B
if P>=M>=K or P>=K>=M:
  print (P)
elif M>P>K or M>K>P:
  print (M)
else:
  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(' '))
print(max(A+B,A-B,A*B))

Submission status: Accepted

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

ans = A+B
if A-B > ans:
    ans = A-B
if A*B > ans:
    ans = 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())

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:
a, b = map(int, input().split())
s = a + b
t = a - b
q = a * b
print(max(s, t, q))

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(A+B,A-B,A*B))

Submission status: Accepted

Solution code:
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

a,b=mp()
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
print(max(a, b, 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:
#!/usr/bin/env python3

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

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
d = a - b
e = a * b
print(max(c, d, e))

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())

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 = [int(s) for s in input().split()]
b = a[0] + a[1]
c = a[0] - a[1]
d = a[0] * a[1]
print(int(max([b,c,d])))

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 = map(int, input().split())
c = a+b
d = a-b
e = a*b
print(max(c,d,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:
A, B = map(int,input().split())

plus = A+B
minus = A-B
mal = A*B

print(max(plus,minus,mal))

Submission status: Accepted

Solution code:
A, B = list(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())
m = max(a+b, a-b, a*b)
print(m)

Submission status: Accepted

Solution code:
n,m = input().split()
A = int(n)
B = int(m)
if (A + B <= A - B <= A * B) or (A - B <= A + B <= A * B):
    print(A * B)
elif(A - B <= A * B <= A + B) or (A * B <= A - B <= A + B):
    print(A + B)
else:
    print(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 = list(map(int, input().split()))

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

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())
print(max(A+B,A-B,A*B))

Submission status: Accepted

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

Submission status: Accepted

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


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, b = list(map(int, input().split()))
ans = [a + b, a - b, a * b]
ans.sort(reverse=True)
print(ans[0])

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**7) #再帰関数の上限,10**5以上の場合python
import math
from copy import copy, deepcopy
from copy import deepcopy as dcp
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right#2分探索
#bisect_left(l,x), bisect(l,x)#aはソート済みである必要あり。aの中からx未満の要素数を返す。rightだと以下
from collections import deque, defaultdict
#deque(l), pop(), append(x), popleft(), appendleft(x)
#q.rotate(n)で → にn回ローテート
from collections import Counter#文字列を個数カウント辞書に、
#S=Counter(l),S.most_common(x),S.keys(),S.values(),S.items()
from itertools import accumulate,combinations,permutations,product#累積和
#list(accumulate(l))
from heapq import heapify,heappop,heappush
#heapify(q),heappush(q,a),heappop(q) #q=heapify(q)としないこと、返り値はNone
from functools import reduce,lru_cache#pypyでもうごく
#@lru_cache(maxsize = None)#maxsizeは保存するデータ数の最大値、2**nが最も高効率
from decimal import Decimal

def input(): 
    x=sys.stdin.readline()
    return x[:-1] if x[-1]=="\n" else x
def printe(*x):print("## ",*x,file=sys.stderr)
def printl(li): _=print(*li, sep="\n") if li else None
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds
def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65
def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65)
def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)]
def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)]
def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)]
def binr(x): return bin(x)[2:]
def bitcount(x): #xは64bit整数
    x= x - ((x >> 1) & 0x5555555555555555)
    x= (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333)
    x= (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f 
    x+= (x >> 8); x+= (x >> 16); x+= (x >> 32) 
    return x & 0x7f

def main():
    mod = 1000000007
    #w.sort(key=itemgetter(1),reverse=True)  #二個目の要素で降順並び替え

    #N = int(input())
    a,b = map(int, input().split())
    #A = tuple(map(int, input().split())) #1行ベクトル
    #L = tuple(int(input()) for i in range(N)) #改行ベクトル
    #S = tuple(tuple(map(int, input().split())) for i in range(N)) #改行行列

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




if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = list(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())

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

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:
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))

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

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

Submission status: Accepted

Solution code:
#入力:N,M(int:整数)
def input2():
	return map(int,input().split())

a,b=input2()
ans=a+b
if a-b>ans:
	ans=a-b
if a*b>ans:
	ans=a*b 
print(ans)

Submission status: Accepted

Solution code:
A=list(map(int,input().split()))
a=A[0]
b=A[1]
if (a+b)>=(a-b):
    if (a+b)>=(a*b):
        print(a+b)
    else:
        print(a*b)
else:
    if (a-b)>=(a*b):
        print(a-b)
    else:
        print(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 = max(a + b, a - b, a * b)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def v(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
cnt = 0
ans = 0
inf = float("inf")

a,b = I()
c = max(a+b,a-b)
print(max(c,a*b))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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:
tmp = input().split(" ")
A = int(tmp[0])
B = int(tmp[1])

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

def main():

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

    listNum = [(A + B), (A - B), (A * B)]

    ans = max(listNum)

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import numpy as np
A, B = map(int, input().split())
data = np.array([A+B, A-B, A*B])
ans = data.max()
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())

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:
# abc137_a.py
# https://atcoder.jp/contests/abc137/tasks/abc137_a

# A - +-x /
# 実行時間制限: 2 sec / メモリ制限: 1024 MB
# 配点 : 100点

# 問題文
# 整数 A, Bがあります。
# A+B,  A−B,  A×Bの中で最大の数を出力してください。

# 制約
#     入力は全て整数である。
#     −100≤A, B≤100

# 入力
# 入力は以下の形式で標準入力から与えられる。
# A B

# 出力
# A+B,  A−B,  A×Bの中で最大の数を出力せよ。

# 入力例 1
# -13 3

# 出力例 1
# -10

# A+B=−10,  A−B=−16,  A×B=−39 の中で最大の数は −10です。

# 入力例 2
# 1 -33

# 出力例 2
# 34

# A+B=−32,  A−B=34,  A×B=−33 の中で最大の数は 34です。

# 入力例 3
# 13 3

# 出力例 3
# 39

# A+B=16,  A−B=10,  A×B=39 の中で最大の数は 39 です。


global FLAG_LOG
FLAG_LOG = False


def log(value):
    # FLAG_LOG = True
    # FLAG_LOG = False
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    # S = lines[0]
    # N = int(lines[0])
    A, B = list(map(int, lines[0].split()))
    # values = list(map(int, lines[1].split()))
    # values = list(map(int, lines[2].split()))
    # values = list()
    # for i in range(6):
    #     values.append(int(lines[i]))
    # valueses = list()
    # for i in range(M):
    #     valueses.append(list(map(int, lines[i+1].split())))

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


# 引数を取得
def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['-13 3']
        lines_export = [-10]
    if pattern == 2:
        lines_input = ['1 -33']
        lines_export = [34]
    if pattern == 3:
        lines_input = ['13 3']
        lines_export = [39]
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode


# 主処理
def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    # if mode > 0:
    #     print(f'lines_input=[{lines_input}]')
    #     print(f'lines_export=[{lines_export}]')
    #     print(f'lines_result=[{lines_result}]')
    #     if lines_result == lines_export:
    #         print('OK')
    #     else:
    #         print('NG')
    # finished = time.time()
    # duration = finished - started
    # print(f'duration=[{duration}]')


# 起動処理
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
p = list(map(int, input().split()))
ans = max(p[0]+p[1], p[0]-p[1], p[0]*p[1])
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())

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

Submission status: Accepted

Solution code:
import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())

A,B = MI()
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([A + B, A - B, A * B]))

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

A, B = mapint()
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())
s = a+b
t = a-b
u = a*b

if s >= t:
    if s >= u:
        print(s)
    else:
        print(u)
elif t >= u:
    if t >= s:
        print(t)
    else:
        print(s)
elif u >= s:
    if u >= t:
        print(u)
    else:
        print(t)

Submission status: Accepted

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

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


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()

Submission status: Accepted

Solution code:
import sys
A,B = map(int,input().split())
if not ( -100 <= A <= 100 and -100 <= B <= 100 ): sys.exit()

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

Submission status: Accepted

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

Submission status: Accepted

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

x.append(a * b)
x.append(a - b)
x.append(a + b)

x = sorted(x)

print(x[2])

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]
List.sort()
print(List[2])

Submission status: Accepted

Solution code:
S=input()
print(max([eval(S.replace(' ',i)) for i in '+-*']))

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:
def main():
 a,b = map(int,input().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
m = A-B
M = A*B

L = []

L.append(p)
L.append(m)
L.append(M)

print(max(L))

Submission status: Accepted

Solution code:
s = input()
l = [int(x) for x in s.split()]
a, b = l[0], l[1]
print(max(a+b, max(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 = [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())
check = []
check.append(a + b)
check.append(a - b)
check.append(a * b)
check.sort()
print(check[2])

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:
#<ABC137>
#<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())
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())
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:
def resolve():
    A, B = list(map(int, input().split()))
    print(max([A*B, A-B, A+B]))

    
if '__main__' == __name__:
    resolve()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
a,b = map(int, input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

print(max(list_ab))

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
plus = a + b
minus = a - b
times = a * b
maxi = plus
if maxi <= minus:
  maxi = minus
if maxi <= times:
  maxi = times
  
print(maxi)

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

answer = [X,Y,Z]
print(max(answer))

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:
import sys
input = sys.stdin.readline

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

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