Problem:


Score : 100 points

Problem Statement

You are given two integers A and B.
Find the largest value among A+B, A-B and A \times B.

Constraints

-1000 \leq A,B \leq 1000

All values in input are integers.

Input

Input is given from Standard Input in the following format:

A B

Output

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

Sample Input 1

3 1

Sample Output 1

4

3+1=4, 3-1=2 and 3 \times 1=3. The largest among them is 4.

Sample Input 2

4 -2

Sample Output 2

6

The largest is 4 - (-2) = 6.

Sample Input 3

0 0

Sample Output 3

0



Sample input:
3 1


Sample output:
4

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

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

Submission status: Accepted

Solution code:
def main(a, b):
    add = a + b
    sub = a - b
    mul = a * b

    return max(add, sub, mul)


if __name__ == "__main__":
    a, b = map(int, input().split(' '))
    print(main(a, b))

Submission status: Accepted

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

a1 = A+B
a2 = A-B
a3 = A*B

print(max(a1,a2,a3))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = [int(_) for _ in input().split()]
if len(a) == 2 and -1000 <= a[0] <= 1000 and -1000 <= a[1] <= 1000:
    print(max(a[0] + a[1], a[0] - a[1], a[0] * a[1]))
else:
    print('hoge!')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = input().split()
a, b =int(num[0]), int(num[1])

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

print(ans[-1])

Submission status: Accepted

Solution code:
import sys
from collections import deque
from collections import  Counter
import statistics
import math

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

a, b = na()
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 math
from fractions import gcd
# import queue
# from collections import Counter
# from itertools import accumulate
# from functools import reduce

def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

big_prime = 1000000007

"""
# 標準入力取得
## 文字列
 =  sys.stdin.readline().rstrip()
 =  list(sys.stdin.readline().rstrip())

## 数値
 =  int(sys.stdin.readline())
 =  map(int, sys.stdin.readline().split())
 =  list(map(int, sys.stdin.readline().split()))
 =  [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""

A, B =  map(int, sys.stdin.readline().split())

print(max(A + B, max(A - B, 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:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

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()))
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:
import sys
a, b = list(map(int, sys.stdin.readline().strip().split(' ')))
sys.stdout.write(str(max(a+b, a-b, a*b)) + '\n')

# test

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


if __name__== "__main__":
    main()

Submission status: Accepted

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

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

print(max(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:
def main():
    A, B = map(int, input().split())
    return max(A+B, A*B, A-B)


if __name__ == '__main__':
    print(main())

Submission status: Accepted

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

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 resolve():
    a, b = map(int, input().split())
    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())
arr = [A + B, A - B, A * B]
print(max(arr))

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

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 test():
    a,b = map(int,input().split())
    c = a * b
    d = a - b
    f = a + b
    s = list([c,d,f])
    print(max(s))


if __name__ == "__main__":
    test()

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

Submission status: Accepted

Solution code:
from sys import stdin
A,B = [int(x) for x in stdin.readline().rstrip().split()]
a1 = A + B
a2 = A - B
a3 = A * B

print(max(a1,a2,a3))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#98

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

Submission status: Accepted

Solution code:
IN = [int(_) for _ in input().split()]
A = IN[0]
B = IN[1]

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:
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 = sorted([A+B, A-B, A*B], reverse=True)
print(C[0])

Submission status: Accepted

Solution code:
A, B = list(map(int,input().split()))
add = A + B 
sub = A - B
mul = A * B
print(max(add,sub,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())
ans = max(max(A+B, A-B), A*B)
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 = list(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:
x,y = map(int,input().split())
nlist = [x+y,x-y,x*y]
print(max(nlist))

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=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())
hako = [a + b, a - b, a * b]
print(max(hako))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
# -*- coding: utf-8 -*-
A,B = [int(i) for i in 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)
elif A*B >= A+B and A*B >= A-B:
    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:
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    a, b = LI()
    print(max(a + b, a - b, a * b))
    return

#B
def B():
    return

#C
def C():
    n = II()
    s = S()
    dp = [0 for i in range(n)]
    for num,si in enumerate(s):
        if si == "E":
            dp[num] = dp[num-1]+1
        else:
            dp[num] = dp[num - 1]
    ans = float("INF")
    a = max(dp)
    for i in range(n):
        ans = min(ans,  a - dp[i] + i - dp[i] + (s[i] == "E"))
    
    print(ans)
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == '__main__':
    A()

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

# print(A)
# print(B)

max_num = A + B

if max_num < A - B:
    max_num = A - B
    
if max_num < A * B:
    max_num = A * B

# print(A + B)
# print(A - B)
# print(A * B)

print(max_num)

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())
lst = [A+B, A-B, A*B]
lst.sort()
print(lst[-1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from functools import reduce
import math

def main():
    # 文字列の2進数を数値にする
    # '101' → '5'
    # 文字列の頭に'0b'をつけてint()にわたす
    # binary = int('0b'+'101',0)

    # 2進数で立っているbitを数える
    # 101(0x5) → 2
    # cnt_bit = bin(5).count('1')
    
    # N! を求める
    # f = math.factorial(N)

    # N の逆元
    # N_inv = pow(N,MOD-2,MOD)

    # nCr
    # Nの階乗 * rの階乗の逆元 * n-rの階乗の逆元
    
    # 切り捨て
    # 4 // 3
    # 切り上げ
    #-(-4 // 3)
    
    # 初期値用:十分大きい数(100億)
    INF = float("inf")

    # 大きな素数
    MOD = 10**9+7
    
    # 1文字のみを読み込み
    # 入力:2
    # a = input().rstrip()
    # 変数:a='2'
    
    # スペース区切りで標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a, b, c, d = (int(_) for _ in input().split())  
    # 変数:a=2 b=4 c=5 d =7
    
    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a = list(int(_) for _ in input().split())
    # 変数:a = [2, 4, 5, 7]    

    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2457
    # a = list(int(_) for _ in input())
    # 変数:a = [2, 4, 5, 7]    
    a,b = (int(_) for _ in input().split())  
    print(max(a+b,a-b,a*b))
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

def input():
    return sys.stdin.readline().rstrip()

if __name__ == "__main__":
    a, b = map(int, input().split())

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

Submission status: Accepted

Solution code:

l = list(map(int, input().split()))

s = []
s.append(l[0] + l[1])
s.append(l[0] - l[1])
s.append(l[0] * l[1])

print(max(s))

Submission status: Accepted

Solution code:
a, b = map(int,input().split())
#ls = list(map(int,input().split()))
#r = int(input())
#s = input()
ls = []
ls.append(a + b)
ls.append(a - b)
ls.append(a * b)

print(max(ls))

Submission status: Accepted

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

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

# solve & output
print(max(A + B, A - B, A * B))

Submission status: Accepted

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

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:
#110
A,B = map(int,input().split())
ans=[A+B,A-B,A*B]
ans = max(ans)
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())

c = [a+b, a-b, a*b]

print(max(c))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

add = A+B
sub = A-B
mul = A*B
print(max(add,sub,mul))

Submission status: Accepted

Solution code:
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

A, B = nl()

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

Submission status: Accepted

Solution code:
def resolve():
    a,b=map(int,input().split())
    l=[a+b,a-b,a*b]
    print(max(l))
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
import math

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

Submission status: Accepted

Solution code:
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, B = [int(ab) for ab in input().split()]
C = A+B
D = A-B
E = A*B
ans = max(C, D, E)
print(ans)

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    A, B = map(int, input().split())

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

Submission status: Accepted

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


abc()

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

Submission status: Accepted

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

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

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

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())
ans=[a+b,a-b,a*b]
print(sorted(ans)[2])
#print(sorted.ans[2])

Submission status: Accepted

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

Submission status: Accepted

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

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

ans = max(a+b, a-b)
ans = max(ans, a*b)

print(ans)

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

ansa= a+b
ansb= a-b
ansc= a*b
li = [ansa,ansb,ansc]

print(max(li))

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())
x1 = a+b
x2 = a-b
x3 = a*b
print(max(x1,x2,x3))

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:
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, raw_input().split())
lst = [A+B, A-B, A*B]
lst.sort()
print lst[-1]

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a, b = [ int(v) for v in 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

nums=[x,y,z]

print(max(nums))

Submission status: Accepted

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


def solve(A: int, B: int):
    print(max(A+B,A-B,A*B))


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

input_list = []
input_list.append(a+b)
input_list.append(a-b)
input_list.append(a*b)

input_list.sort(reverse=True)

print(input_list[0])

Submission status: Accepted

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

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

Submission status: Accepted

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


def solve(A: int, B: int):
    ret = max(A + B, A - B, A * B)
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
###############################################################################

from sys import stdout
from bisect import bisect_left as binl
from copy import copy, deepcopy
from collections import defaultdict


mod = 1


def intin():
    input_tuple = input().split()
    if len(input_tuple) <= 1:
        return int(input_tuple[0])
    return tuple(map(int, input_tuple))


def intina():
    return [int(i) for i in input().split()]


def intinl(count):
    return [intin() for _ in range(count)]


def modadd(x, y):
    global mod
    return (x + y) % mod


def modmlt(x, y):
    global mod
    return (x * y) % mod


def lcm(x, y):
    while y != 0:
        z = x % y
        x = y
        y = z
    return x


def combination(x, y):
    assert(x >= y)

    if y > x // 2:
        y = x - y

    ret = 1

    for i in range(0, y):
        j = x - i
        i = i + 1

        ret = ret * j
        ret = ret // i

    return ret


def get_divisors(x):
    retlist = []
    for i in range(1, int(x**0.5) + 3):
        if x % i == 0:
            retlist.append(i)
            retlist.append(x // i)
    return retlist


def get_factors(x):
    retlist = []
    for i in range(2, int(x**0.5) + 3):
        while x % i == 0:
            retlist.append(i)
            x = x // i
    retlist.append(x)
    return retlist


def make_linklist(xylist):
    linklist = {}
    for a, b in xylist:
        linklist.setdefault(a, [])
        linklist.setdefault(b, [])
        linklist[a].append(b)
        linklist[b].append(a)
    return linklist


def calc_longest_distance(linklist, v=1):
    distance_list = {}
    distance_count = 0
    distance = 0
    vlist_previous = []
    vlist = [v]
    nodecount = len(linklist)

    while distance_count < nodecount:
        vlist_next = []
        for v in vlist:
            distance_list[v] = distance
            distance_count += 1
            vlist_next.extend(linklist[v])
        distance += 1
        vlist_to_del = vlist_previous
        vlist_previous = vlist
        vlist = list(set(vlist_next) - set(vlist_to_del))

    max_distance = -1
    max_v = None
    for v, distance in distance_list.items():
        if distance > max_distance:
            max_distance = distance
            max_v = v

    return (max_distance, max_v)


def calc_tree_diameter(linklist, v=1):
    _, u = calc_longest_distance(linklist, v)
    distance, _ = calc_longest_distance(linklist, u)
    return distance


###############################################################################


def main():
    a, b = intin()

    c = a + b
    d = a - b
    e = a * b

    print(max([c, d, e]))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    a,b = f()
    print(max(a+b, a-b, a*b))

solve()

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, max(a-b,a*b)))

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 = [int(i) for i in input().split()]
print(max(A+B, A-B, A*B))

Submission status: Accepted

Solution code:
b, c = map(int, input().split())
print(max(b+c,b-c,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:
from collections import defaultdict
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, input().split()))
def inpl_str(): return list(input().split())

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

Submission status: Accepted

Solution code:
# 2019/05/12
# AtCoder Beginner Contest 098 - A

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

# Calc
c_max = a + b
mi = a - b
ti = a * b

if c_max < mi:
    c_max = mi
if c_max < ti:
    c_max = ti
    
# Output
print(c_max)

Submission status: Accepted

Solution code:
# 2019/05/12
# AtCoder Beginner Contest 098 - A

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

# Calc
c_max = max(a+b, a-b, a*b)

# Output
print(c_max)

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()[:-1]

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}


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



if __name__ == '__main__':
    main()

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

k=a+b
m=a-b
n=a*b

print(max(k,m,n))

Submission status: Accepted

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

Submission status: Accepted

Solution code:


def read_input():
    a, b = map(int, input().split())
    return a, b


def submit():
    a, b = read_input()

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

if __name__ == '__main__':
    submit()

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

minAns = -1000001
tmp1 = A + B
tmp2 = A * B
tmp3 = A - B
minAns = max(minAns, tmp1, tmp2, tmp3)

print(minAns)

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(_) for _ in input().split())  

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import numpy as np
import math
import re

n = input()

n = re.split(" ",n)

a = int(n[0])
b = int(n[1])

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())
add = a + b
sub = a - b
mul = a * b
ans = [add, sub, mul]
print(max(ans))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import numpy as np
import math
import re

n = input()

n = re.split(" ",n)

a = int(n[0])
b = int(n[1])

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

print(max(x,y,z))

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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


def solve(A: int, B: int):
    ret = max(A + B, A * B, A - B)
    print(ret)


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)

if __name__ == '__main__':
    main()

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

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

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

Submission status: Accepted

Solution code:
#!/usr//bin/env python3.6
# -coding:UTF-8-

ab=input().split()
a=int(ab[0])
b=int(ab[1])
list=[a+b,a-b,a*b]
list.sort()
print(list[2])

Submission status: Accepted

Solution code:
ab=input().split()
a=int(ab[0])
b=int(ab[1])
ans_list=[a+b,a-b,a*b]
ans_list.sort()
ans=ans_list[2]
print(ans)

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
m = a - b 
n = a*b
print(max([l,m,n]))

Submission status: Accepted

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

Submission status: Accepted

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