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: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n,*a=map(int,open(0).read().split());x=s=l=c=0
for r,b in enumerate(a):
  x^=b;s+=b
  while x<s:x^=a[l];s-=a[l];l+=1
  c+=r-l+1
print(c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8

# https://atcoder.jp/contests/abc098/tasks/abc098_a


def main():
    a, b = map(int, input().split())
    return max(a+b, a-b, a+b)


print(main())

Submission status: Wrong Answer

Solution code:
X = input()
X = list(map(int, X.split()))
A = X[0]
B = X[1]
so = A+B
su = A-B
m = A*B
if (so > su and so > m):
    print(so)
else:
    if (su > so and su > m):
        print(su)
    else:
        print(m)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

s = (a + b) 
sub = (a - b) 
m = (a * b) 

s2 = False
m2 = False
sub2 = False

if s<0:
    s = s*-1
    s2 = True

if sub<0:
    sub = sub*-1
    sub2 = True

if m < 0:   
    m = m*-1
    m2 = True

if s>sub and s>m:
    if s2:
        print(-1*s)
    else:
        print(s)

elif sub>s and sub>m:
    if sub2:
        print(sub*-1)
    else:
        print(sub)

else:
    if m2:
        print(m*-1)
    else:
        print(m)

Submission status: Wrong Answer

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

mult = x*y
soma = x+y
sub = x-y
if(x == 0 and y == 0):
    print(0)
if(mult > soma and mult > sub):
    print(mult)
if(soma > mult and soma > sub):
    print(soma)
if(sub > soma and sub > mult):
    print(sub)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

s = a + b
sub = a - b
m = a * b

if s>sub and s>m:
    print(s)
elif sub>s and sub>m:
    print(sub)
else:
    print(m)

Submission status: Wrong Answer

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

s = a + b
sub = a - b
m = a*b

if s>sub and a>m:
    print(s)
elif sub>a and sub>m:
    print(sub)
else:
    print(m)

Submission status: Wrong Answer

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

mult = x*y
soma = x+y
sub = x-y
if(x==0 and y==0):
    print(0)
if(mult>soma and mult>sub):
    print(mult)
if(soma>mult and soma>sub):
    print(soma)
if(sub>soma and sub>mult):
    print(sub)

Submission status: Wrong Answer

Solution code:
line = input()
X,Y = [int(n) for n in line.split()]

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

max(a,b,c)

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())

if (X+Y > X-Y and X+Y > X*Y):
  print(X+Y)

elif(X-Y > X+Y and X-Y > X*Y):
  print(X-Y)

else:
  print(X*Y)

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())

if (X+Y > X-Y and X+Y > X*Y):
  print(X+Y)

elif(X-Y > X+Y and X-Y > X*Y):
  print(X-Y)

elif(X*Y > X+Y and X*Y > X-Y):
  print(X*Y)

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())

if ((X+Y) > (X-Y) and (X+Y) > (X*Y)):
  print(X+Y)

elif ((X-Y) > (X+Y) and (X-Y) > (X*Y)):
  print(X+Y)

else:
  print(X*Y)

Submission status: Wrong Answer

Solution code:
def Add_Sub_Mul(a , b):

    return min(a + b , a - b , a * b)

def main():
    a , b = map(int , input().split())
    print(Add_Sub_Mul(a , b))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if 1>A>0 and 1>B>0:
  print(A+B)
elif A>0 and 0>B:
  print(A-B)
elif A>=B>1 or B>=A>1 or -1>A>=B or -1>B>=A:
  print(A*B)

Submission status: Wrong Answer

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

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: Wrong Answer

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

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)
elif A-B>A+B>A*B or A-B>A*B>A+B:
  print(A-B)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x, y = map(int,raw_input().split())
a = x+y
b = x-y
c = x*y
if a > b and c:
    print a
elif b > a and c:
    print b
elif c > b and a:
    print c

Submission status: Wrong Answer

Solution code:
a,b=map(int,raw_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: Wrong Answer

Solution code:
(a, b) = list(map(int, input().split()))
max = a+b
if max <= a*b:
  max = a*b
if max <= a-b:
  max = a-b
if b != 0 and max <= a / b:
  max = a / b
print(max)

Submission status: Wrong Answer

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

if (a>=0) & (b>=0):
  print(a*b)
elif (a<0) & (b<0):
  print(a*b)
elif b<0:
  print(a-b)

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
if (x+y) > (x*y):
  if (x+y) > (x-y):
    print(str(x+y))
  elif (x-y) > (x+y):
    print(str(x-y))
elif (x*y) > (x-y):
  print(str(x*y))
elif (x-y) > (x*y):
  print(str(x-y))
elif (x == y) :
  print(str(x*y))

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
if (x+y) > (x*y):
  if (x+y) > (x-y):
    print(str(x+y))
  elif (x-y) > (x+y):
    print(str(x-y))
elif (x*y) > (x-y):
  print(str(x*y))
elif (x-y) > (x*y):
  print(str(x-y))
elif (x == 0& y == 0) :
  print("0")

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
if (x+y) > (x*y):
  if (x+y) > (x-y):
    print(str(x+y))
  elif (x-y) > (x+y):
    print(str(x-y))
elif (x*y) > (x-y):
  print(str(x*y))
elif (x == 0& y == 0) :
  print("0")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if a>1 and b>1:
    print(a*b)
elif b<0:
    print(a-b)
else:
    print(a+b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
p = list(S)
wordcount ={}
for i in p :
  if i not in wordcount:
    wordcount[i] = 1
  else:
    wordcount[i] +=1
result = 0
for key,value in wordcount.items():
  if value >=2:
    result += 1
print(result)

Submission status: Wrong Answer

Solution code:
#2019/09/26
A, B = map(int, input().split())

# try:
#     print(max(A+B, A-B, A*B, A/B))
# except ZeroDivisionError:
#     print(max(A+B, A-B, A*B))

if B == 0:
    print(max(A+B, A-B, A*B))
else:
    print(max(A+B, A-B, A*B, A/B))

Submission status: Wrong Answer

Solution code:
#2019/09/26
A, B = map(int, input().split())

try:
    print(max(A+B, A-B, A*B, A/B))
except ZeroDivisionError:
    print(max(A+B, A-B, A*B))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


if __name__ == "__main__":
    test()

Submission status: Wrong Answer

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


if __name__ == "__main__":
    test()

Submission status: Wrong Answer

Solution code:
def test():
    a,b = map(int,input().split())
    if a < 0:
        print(b-a)
    elif b < 0:
        print(a-b)
    elif a*b < a+b:
        print(a+b)
    else:
        print(a*b)


if __name__ == "__main__":
    test()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b = map(int,input().split())
#ls = list(map(int,input().split()))
#r = int(input())
#s = input()

if a < 0 or b < 0:
  print(abs(a) + abs(b))
  exit()
if a == 1 or b == 1:
  print(a + b)
else:
  print(a * b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

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)
elif Z > X and Z > Y:
    print(Z)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
sum = a + b
mul = a * b
if sum < mul:
	print(mul)
else:
	print(sum)

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

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

add = A + B
sub = A - B
mul = A * B

if add > sub and add > mul:
    print(add)
elif sub > add and sub > mul:
    print(sub)
elif mul > add and mul > sub:
    print(mul)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if B < 0:
    print(A - B)
elif B < 0 and A < 0:
    print(A * B)
elif A > 1 and B > 1:
    print(A * B)
elif A == 0 or B == 0:
    print(A + B)
else:
    print(A + B)

Submission status: Wrong Answer

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

if B < 0:
    print(A - B)
elif A > 1 and B > 1:
    print(A * B)
elif A == 0 or B == 0:
    print(A + B)
else:
    print(A + B)

Submission status: Wrong Answer

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

if B < 0:
    print(A - B)
elif A > 1 and B > 1:
    print(A * B)
elif A == 1 or B == 1:
    print(A + B)

Submission status: Wrong Answer

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

if B < 0:
    print(A - B)
elif A > 1 and B > 1:
    print(A * B)
else:
    print(A + B)

Submission status: Wrong Answer

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

if A > 0 and B < 0:
    print(A - B)
elif A > 1 and B > 1:
    print(A * B)
elif A > B and A < 0:
    print(A - B)
else:
    print(A + B)

Submission status: Wrong Answer

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

if A > 0 and B < 0:
    print(A - B)
elif A > 1 and B > 1:
    print(A * B)
else:
    print(A + B)

Submission status: Wrong Answer

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

if B < 0:
    print(A - B)
elif B == 1:
    print(A + B)
elif A < 0:
    print(A + B)
elif A == 1:
    print(A + B)
else:
    print(A * B)

Submission status: Wrong Answer

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

if B < 0:
    print(A - B)
elif B == 1:
    print(A + B)
elif A == 1:
    print(A + B)
else:
    print(A * B)

Submission status: Wrong Answer

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

if A > 0 and B < 0:
    print(A - B)
elif A == 1 or B ==1:
    print(A + B)
elif A < 0 and B > 0:
    print(A + B)
elif A < 0 and B < 0:
    print(A - B)
else:
    print(A * B)

Submission status: Wrong Answer

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

if B < 0:
    print(A - B)
elif A == 1 or B ==1:
    print(A + B)
elif A < 0:
    print(A + B)
else:
    print(A * B)

Submission status: Wrong Answer

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

if B < 0:
    print(A - B)
elif A == 1 or B ==1:
    print(A + B)
else:
    print(A * B)

Submission status: Wrong Answer

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

if B < 0:
    print(A - B)
elif A == 1:
    print(A + B)
else:
    print(A * B)

Submission status: Wrong Answer

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

if A < 0 or B < 0:
    print(abs(A) + abs(B))
elif A == 1 or B == 1:
    print(A + B)
else:
    print(A * B)

Submission status: Wrong Answer

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

if A < 0 or B < 0:
    print(abs(A) + abs(B))
else:
    print(A * B)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B = [int(x) for x in input().split()]
if B == 0:
    print(A)
else:
    calc_res = [A+B, A-B, A*B, A/B]
    print(max(calc_res))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
A, B = map(int, input().split())
print(min(A + B, A - B, A * B))

Submission status: Wrong Answer

Solution code:
list1 = [int(a) for a in input().split()]
list1_0 = list1[0] #A
list1_1 = list1[1] #B

plus = list1_0 + list1_1
minus = list1_0 - list1_1
multiplication = list1_0 * list1_1

max_ans = 0

if max_ans < plus:
    max_ans = plus
if max_ans < minus:
    max_ans = minus
if max_ans < multiplication:
    max_ans = multiplication

print(max_ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
S=A+B
T=A-B
U=A*B
if (S>T) & (S>U):
    print(S)
elif (T>S) & (T>U):
    print(T)
else:
    print(U)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
S=A+B
T=A-B
U=A*B
if S>T & S>U:
    print(S)
elif T>S & T>U:
    print(T)
else:
    print(U)

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
maxNum = A + B
if maxNum <= A-B:
    maxNum = A-B
elif maxNum <= A*B:
    maxNum = A*B
print(maxNum)

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
maxNum = A + B
if maxNum < A-B:
    maxNum = A-B
elif maxNum < A*B:
    maxNum = A*B
print(maxNum)

Submission status: Wrong Answer

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

if (a>1 and b>1) or(a<-1 and b<-1):
    print(a*b)
elif (a>0 and b<0):
    print(a-b)
elif (a<0 and b>0):
    print(b-a)
else:
    print(a+b)

Submission status: Wrong Answer

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

if (a>1 and b>1) or(a<0 and b<0):
    print(a*b)
elif (a>0 and b<0):
    print(a-b)
elif (a<0 and b>0):
    print(b-a)
else:
    print(a+b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
a = A+B 
s = A-B
d = A*B
if a>s>d or a>d>s:
    print(a)
elif s>a>d or s>d>a:
    print(s)
else:
    print(d)

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
A, B = [int(i) for i in input().split()]
List = [A+B, A-B, B-A, A*B]
List = sorted(List)
print(List[3])

Submission status: Wrong Answer

Solution code:
A, B = [int(i) for i in input().split()]
if A*B>0 and A!=1 and B!=1:
  print(A*B)
elif A+B>A*B and A>0 and B>0:
  print(A+B)
elif A<0 or B<0:
  print(A-B) if A-B>B-A else print(B-A)
else:
  print(A+B)

Submission status: Wrong Answer

Solution code:
A, B = [int(i) for i in input().split()]
if A*B>A+B and A*B>0:
  print(A*B)
elif A+B>A-B and A+B>B-A and A*B>0:
  print(A+B)
else:
  print(A-B) if A-B>B-A else print(B-A)

Submission status: Wrong Answer

Solution code:
A, B = [int(i) for i in input().split()]
if A*B>A+B:
  print(A*B)
elif A*B>0:
  print(A+B)
else:
  print(A-B) if A-B>B-A else print(B-A)

Submission status: Wrong Answer

Solution code:
A, B = [int(i) for i in input().split()]
if A*B>A and A*B>B:
  print(A*B)
elif A*B>0:
  print(A+B)
else:
  print(A-B) if A-B>B-A else print(B-A)

Submission status: Wrong Answer

Solution code:
A, B = [int(i) for i in input().split()]
if A*B>A and A*B>B:
  print(A*B)
elif A*B>0:
  print(A+B)
else:
  print(A-B) if A-B>0 else print(B-A)

Submission status: Wrong Answer

Solution code:
A, B = [int(i) for i in input().split()]
if A*B>A and A*B>B:
  print(A*B)
elif A*B>0:
  print(A+B)
else:
  print(A-B)

Submission status: Wrong Answer

Solution code:
A, B = [int(i) for i in input().split()]
if A*B>A or A*B>B:
  print(A*B)
elif A*B>0:
  print(A+B)
else:
  print(A-B)

Submission status: Wrong Answer

Solution code:
A, B = [int(i) for i in input().split()]
if A*B==A or A*B==B:
  print(A+B)
elif A*B>0:
  print(A*B)
else:
  print(A-B)

Submission status: Wrong Answer

Solution code:
import sys

def forward(s1, c):
    for s in s1:
        if s > c:
            return False
    return True

    
S = sys.stdin.readline().strip()

c_list = [chr(i) for i in range(97, 97+26)]
#num_list = [int(chr(s)) for s in S]
s_list = [s for s in S]
all_char = "abcdefghijklmnopqrstuvwxyz"

if S == "zyxwvutsrqponmlkjihgfedcba":
    print("-1")
elif len(S) != 26:
    for c in c_list:
        if c not in s_list:
            print(S + c)
            break
else:
    for i in reversed(list(range(26))):
        sub = S[i+1:]
        if forward(sub, S[i]):
            # S[i]が最大
            pass
        else:
            m = max(sub)
            tmp = []
            for mm in sub:
                if mm != m:
                    tmp.append(mm)
            tmp.append(S[i])
            print(S[:i] + m + "".join(sorted(tmp)))
            break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
max = 0
for i in range(3):
  if A+B > max:
    max = A+B
  if A-B > max:
    max = A-B
  if A*B > max:
    max = A*B
print(max)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=input()
b=a.split()
c=[int(i) for i in b]
t=c[0]+c[1]
h=c[0]-c[1]
k=c[0]*c[1]
#ans=max([t,h,c])
#print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
line = input().split()
  
input_a = int(line[0])
input_b = int(line[1])

sum = input_a + input_b
sub = input_a - input_b
mul = input_a * input_b

if sum > sub and sum > mul:
  print(sum)
elif sub > sum and sub > mul:
  print(sub)
else:
  print(mul)

Submission status: Wrong Answer

Solution code:
line = input().split()
  
input_a = int(line[0])
input_b = int(line[1])
print(input_b)

sum = input_a + input_b
sub = input_a - input_b
mul = input_a * input_b

print(sub)

if sum > sub and sum > mul:
  print(sum)
elif sub > sum and sub > mul:
  print(sub)
else:
  print(mul)

Submission status: Wrong Answer

Solution code:
line = input().split()
  
input_a = int(line[0])
input_b = int(line[1])

sum = input_a + input_b
sub = input_a - input_b
mul = input_a * input_b

if [sum > sub] and [sum>mul]:
  print(sum)
elif [sub > sum] and [sub>mul]:
  print(sub)
else:
  print(mul)

Submission status: Wrong Answer

Solution code:
N = input().split()
for i in range(2):
    if i == 0:
        A = int(N[i])
    elif i == 1:
        B = int(N[i])

X_1 = A + B
X_2 = A - B
X_3 = A * B

max = X_1

if max < X_2:
    max = X_2
elif max < X_3:
    max = X_3

print(max)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
li = list(map(int,input().split()))
ans = [li[0]+li[1],li[0]-li[1],li[1]-li[0],li[0]*li[1]]
ans.sort()
print(ans[3])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=list(map(int,input().split()))
if a[0]+a[1]>a[0]-a[1]&a[0]+a[1]>a[0]*a[1]:
    print(a[0]+a[1])
elif a[0]*a[1]>a[0]+a[1]&a[0]*a[1]>a[0]-a[1]:
    print(a[0]*a[1])
else :
    print(a[0]-a[1])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b = list(map(int, input().split()))
pl = a + b
mi = a - b
mul = a * b

if pl >= mi and pl >= mul:
  print(pl)
if mi >= pl and pl >= mul:
  print(mi)
if mul >= pl and mul >= mi:
  print(mul)

Submission status: Wrong Answer

Solution code:
a, b = list(map(int, input().split()))
pl = a + b
mi = a - b
mul = a * b

if pl > mi:
  if mul > pl:
    print(mul)
  else:
    print(pl)
elif pl > mi:
  if mul > pl:
    print(mul)
  else:
    print(mi)
elif mi > mul:
  if pl > mi:
    print(pl)
  else:
    print(mi)

Submission status: Wrong Answer

Solution code:
a, b = list(map(int, input().split()))
pl = a + b
mi = a - b
mul = a * b

if pl > mi:
  if mul > pl:
    print(mul)
  else:
    print(pl)
else:
  if mul > pl:
    print(mul)
  else:
    print(mi)

Submission status: Wrong Answer

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

print (max(abs(a-b),abs(a+b),a*b)) # Aの値が出力される

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

def calc(a, b):
    r1 = a + b
    r2 = a - b
    r3 = a * b

    if r1 > r2 and r1 > r3:
        return r1
    elif r1 < r2 and r2 > r3:
        return r2
    elif r1 < r3 and r2 < r3:
        return r3

# output
print(calc(a, b))

Submission status: Wrong Answer

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

def calc(a, b):
    r1 = a + b
    r2 = a - b
    r3 = a * b

    if r1 > r2 and r1 > r3:
        return r1
    elif r1 < r2 and r2 > r3:
        return r2
    else:
        return r3

# output
print(calc(a, b))

Submission status: Wrong Answer

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

def calc(a, b):
    r1 = a + b
    r2 = a - b
    r3 = a * b

    if r1 > r2 or r1 > r3:
        return r1
    elif r2 > r3:
        return r2
    else:
        return r3

# output
print(calc(a, b))

Submission status: Wrong Answer

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

def calc(a, b):
    r1 = a + b
    r2 = a - b
    r3 = a * b

    if r1 > r2:
        return r1
    elif r2 > r3:
        return r2
    else:
        return r3

# output
print(calc(a, b))

Submission status: Wrong Answer

Solution code:
from sys import stdin

A, B = stdin.readline().rstrip().split()


a = int(A)
b = int(B)
print(type(A))
print(max(a+b, a-b, a*b))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
num=input().split()
a=int(num[0])
b=int(num[1])
if a==0 or b==0:
  print(max([a+b,a-b,a*b]))
else:
  print(max([a+b,a-b,a*b,a/b]))

Submission status: Wrong Answer

Solution code:
ab =input().split()
a,b = int(ab[0]),int(ab[1])
x = 0
if a + b > x:
  x = a + b
if a - b > x:
  x = a - b
if a * b > x:
  x =a * b

print(x)

Submission status: Wrong Answer

Solution code:
def f(A,B):
      return max(A+B,A-B,A*B)

Submission status: Wrong Answer

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

max = a + b
if a - b > max:
    max = a - b
elif a * b > max:
    max = a * b
print(max)

Submission status: Wrong Answer

Solution code:
data = input().split(" ")
a = int(data[0])
b = int(data[1])
if (a > 1 and b > 1):
	print(a*b)
elif (a >= 0 and b < 0):
	print(a-b)
elif (a <= 0 and b >= 0):
	print(a+b)
elif (a < 0 and b <= 0):
	print(a*b)
else: print(a+b)

Submission status: Wrong Answer

Solution code:

#
a = input().split()

wa = int(a[0])+int(a[1])
minus = int(a[0])-int(a[1])
seki = int(a[0])*int(a[1])

if wa == minus:
    print(str(wa))
elif wa > minus and wa > seki:
    print(str(wa))
elif minus > wa and minus > seki:
    print(str(minus))
else:
    print(str(seki))

Submission status: Wrong Answer

Solution code:

#
a = input().split()

wa = int(a[0])+int(a[1])
minus = int(a[0])-int(a[1])
seki = int(a[0])*int(a[1])

if wa > minus and wa > seki:
    print(str(wa))
elif minus > wa and minus > seki:
    print(str(minus))
else:
    print(str(seki))

Submission status: Wrong Answer

Solution code:
A,B=[int(i) for i in 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: Wrong Answer

Solution code:
# coding: utf-8
a, b = map(int, input().split())
max = -1
X = [a+b,a-b,a*b]
for i in range(len(X)):
    if X[i] > max:
        max = X[i]

print(max)

Submission status: Wrong Answer

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

if (A < 0 and B < 0) or (A > 1 and B > 1):
    print(A * B)
elif B < 0:
    print(A - B)
else:
    print(A + B)

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())
print(min(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()))

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

input = sys.stdin.buffer.readline
in_n = lambda: int(input())
in_nn = lambda: map(int, input().split())
in_s = lambda: input().rstrip().decode('utf-8')
in_map = lambda: [s == ord('.') for s in input() if s != ord('\n')]

MOD = 10**9 + 7
INF = 8 * 10**18


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

Submission status: Accepted

Solution code:
lst = input().split()
a = int(lst[0])
b = int(lst[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())

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

print(max(A))

Submission status: Accepted

Solution code:
def mapt(fn, *args):
    return tuple(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))


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

main()

Submission status: Accepted

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

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

Submission status: Accepted

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