ZhenlongDai/ACPR huggingface dataset:
Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
K,A,B = map(int, input().split())
cookie = 0

if K < A or B - A <= 2 + A - 1:
    print(K + 1)

else:
    cookie = B
    K = K-A-1

    if K%2==0:
        cookie += (B-A)* math.floor(K/2)
        print(cookie)
    else:
        cookie += (B-A)*math.floor((K-1)/2)
        print(cookie + 1)


Failing test case input:
407766107 9307229 14836778

Expected output:
1101648954500241


Actual output:
407766108


Fixed submission (verdict: Accepted):
import math
K,A,B = map(int, input().split())
cookie = 0

if abs(A-B) <= 1:
    print(K + 1)
elif A > B:
    print(K + 1)

else:
    cookie = B
    K = K-A-1

    if K%2==0:
        cookie += (B-A)* math.floor(K/2)
        print(cookie)
    else:
        cookie += (B-A)*math.floor((K-1)/2)
        print(cookie + 1)

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
K,A,B = map(int, input().split())
cookie = 0

if K ==1:
    print(2)
else:


    if K < A - 1 or B - A <  A  or B - A < 2:
        print(K + 1)


    else:
        cookie = B
        K = K-A-1

        if K%2==0:
            cookie += (B-A)* math.floor(K/2)
            print(cookie)
        else:
            cookie += (B-A)*math.floor((K-1)/2)
            print(cookie + 1)


Failing test case input:
407766107 9307229 14836778

Expected output:
1101648954500241


Actual output:
407766108


Fixed submission (verdict: Accepted):
import math
K,A,B = map(int, input().split())
cookie = 0

if abs(A-B) <= 1:
    print(K + 1)
elif A > B:
    print(K + 1)

else:
    cookie = B
    K = K-A-1

    if K%2==0:
        cookie += (B-A)* math.floor(K/2)
        print(cookie)
    else:
        cookie += (B-A)*math.floor((K-1)/2)
        print(cookie + 1)

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
K,A,B = map(int, input().split())
cookie = 0

if K > A  or B - A <  A  :
    
    cookie = B
    K = K-A-1

    if K%2==0:
        cookie += (B-A)* math.floor(K/2)
        print(cookie)
    else:
        cookie += (B-A)*math.floor((K-1)/2)
        print(cookie + 1)
else:
    print(K + 1)

Failing test case input:
5043377 14592 21

Expected output:
5043378


Actual output:
-36637205811


Fixed submission (verdict: Accepted):
import math
K,A,B = map(int, input().split())
cookie = 0

if abs(A-B) <= 1:
    print(K + 1)
elif A > B:
    print(K + 1)

else:
    cookie = B
    K = K-A-1

    if K%2==0:
        cookie += (B-A)* math.floor(K/2)
        print(cookie)
    else:
        cookie += (B-A)*math.floor((K-1)/2)
        print(cookie + 1)
Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


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

money = 0
cookie = 1
move = k

if a + 1 < b:
    cookie += b
    if int((k-a)/2) > 1:
        cookie += (int((k-a)/2)*(b-a))
    if ((k-a)/2) - int((k-a)/2) > 0:
        cookie += 1
else:
    cookie += k

print('{}'.format(cookie))

Failing test case input:
0011 0 4

Expected output:
24


Actual output:
26


Fixed submission (verdict: Accepted):
k, a, b = map(int, input().split())

cookie = 0

if a + 2 >= b or k + 1 < a:
    cookie = k + 1
else:
    action = int((k-(a-1))/2)
    cookie = a
    if action >= 1:
        cookie += action*(b-a)
    if (k-(a-1))/2 - action > 0:
        cookie += 1

print('{}'.format(cookie))

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
K,A,B = map(int, input().split())
cookie = 0

if K < A + 1 or B - A <  A  or B - A < 2:
    print(K + 1)

else:
    cookie = B
    K = K-A-1

    if K%2==0:
        cookie += (B-A)* math.floor(K/2)
        print(cookie)
    else:
        cookie += (B-A)*math.floor((K-1)/2)
        print(cookie + 1)



Failing test case input:
407766107 9307229 14836778

Expected output:
1101648954500241


Actual output:
407766108


Fixed submission (verdict: Accepted):
import math
K,A,B = map(int, input().split())
cookie = 0

if abs(A-B) <= 1:
    print(K + 1)
elif A > B:
    print(K + 1)

else:
    cookie = B
    K = K-A-1

    if K%2==0:
        cookie += (B-A)* math.floor(K/2)
        print(cookie)
    else:
        cookie += (B-A)*math.floor((K-1)/2)
        print(cookie + 1)

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    k,a,b=map(int, input().split())
    ans=0
    if b-1>a+1 and k>=a+1:
        k-=a+1
        ans+=b
        ans+=k
        if k==1:
            ans+=1
        print(ans)

    else:
        print(1+k)

resolve()

Failing test case input:
0010 4 12

Expected output:
29


Actual output:
17


Fixed submission (verdict: Accepted):
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    k,a,b=map(int, input().split())
    ans=0
    if b-1>a+1 and k>=a+1:
        k-=a+1
        ans+=b
        ans+=max(k
        print(ans)

    else:
        print(1+k)
resolve()

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
k, a, b = map(int, input().split())


if a+2 > b:
    print(1 + k)
    exit()


roop_turn = a+2


if k < roop_turn-1:
    print(1 + k)
    exit()


ret = b


remaining = k - roop_turn-1

q, mod = divmod(remaining, 2)

ret += (b-a)*q + mod
print(ret)


Failing test case input:
0010 -2 1

Expected output:
17


Actual output:
14


Fixed submission (verdict: Accepted):
k, a, b = map(int, input().split())


if a+2 > b:
    print(1 + k)
    exit()


roop_turn = a+2


if k < roop_turn-1:
    print(1 + k)
    exit()


ret = b


remaining = k - (roop_turn-1)

q, mod = divmod(remaining, 2)

ret += (b-a)*q + mod
print(ret)
Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c = map(int,input().split())
kaisuu = int((a-(b-1))/2)
amari = (a-(b-1))%2
if b >= (c-2):
        print(a+1)
else:
        if amari == 1:
                print(kaisuu*(c-b)+1)
        else:
                print(kaisuu*(c-b))

Failing test case input:
407766107 9307229 25447105

Expected output:
3215538450316794


Actual output:
3215538441009565


Fixed submission (verdict: Accepted):
a,b,c = map(int,input().split())
kaisuu = int((a-(b-1))/2)
amari = (a-(b-1))%2
if b >= (c-2):
        print(a+1)
else:
        if amari == 1:
                print(kaisuu*(c-b)+1+b)
        else:
                print(kaisuu*(c-b)+b)

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
k, a, b = map(int, input().split())

cookie = 0

if a + 2 >= b or k + 1 < a:
    cookie = k + 1 
else:
    action = int((k-(a-1))/2)
    cookie = b
    if action > 1:
        cookie += (action-1)*(b-a)
    if (k-(a-1))/2 - action > 0:
        cookie += 1

print('{}'.format(cookie))

Failing test case input:
3 3 6

Expected output:
4


Actual output:
7


Fixed submission (verdict: Accepted):
k, a, b = map(int, input().split())

cookie = 0

if a + 2 >= b or k + 1 < a:
    cookie = k + 1
else:
    action = int((k-(a-1))/2)
    cookie = a
    if action >= 1:
        cookie += action*(b-a)
    if (k-(a-1))/2 - action > 0:
        cookie += 1

print('{}'.format(cookie))

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
k, a, b = map(int, input().split())
bis, jpn = 1, 0
if b-a < 2 or k <= a-1:
    print(k+1)
else:

    bis = a + max(b-a, 2) * (k-a+1)/2 + (k-a+1)%2
        
    print(int(bis))






Failing test case input:
1110 0 4

Expected output:
2221


Actual output:
2223


Fixed submission (verdict: Accepted):
k, a, b = map(int, input().split())
bis, jpn = 1, 0
if b-a < 2 or k <= a-1:
    print(k+1)
else:

    bis = a + max(b-a, 2) * int((k-a+1)/2) + (k-a+1)%2
        
    print(int(bis))

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
K,A,B = map(int, input().split())
cookie = 0

if K < A - 1 or B - A <  A  or B - A < 2:
    print(K + 1)

else:
    cookie = B
    K = K-A-1

    if K%2==0:
        cookie += (B-A)* math.floor(K/2)
        print(cookie)
    else:
        cookie += (B-A)*math.floor((K-1)/2)
        print(cookie + 1)


Failing test case input:
407766107 9307229 14836778

Expected output:
1101648954500241


Actual output:
407766108


Fixed submission (verdict: Accepted):
import math
K,A,B = map(int, input().split())
cookie = 0

if abs(A-B) <= 1:
    print(K + 1)
elif A > B:
    print(K + 1)

else:
    cookie = B
    K = K-A-1

    if K%2==0:
        cookie += (B-A)* math.floor(K/2)
        print(cookie)
    else:
        cookie += (B-A)*math.floor((K-1)/2)
        print(cookie + 1)
Problem: p03131
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
arr = input().split()
K = int(arr[0])
A = int(arr[1])
B = int(arr[2])

n = 1 + K

x = B
K -= A+1

temp = int(K / 2)

x += temp * abs(B-A)
K -= temp * 2

while K > 0:
	K -= 1
	x += 1

print(max(x, n))


Failing test case input:
1765 13 0

Expected output:
1766


Actual output:
11376


Fixed submission (verdict: Accepted):
arr = input().split()
K = int(arr[0])
A = int(arr[1])
B = int(arr[2])

n = 1 + K
x = 1
if K > A:
	x = B
	K -= A+1

	temp = int(K / 2)

	x += temp * (B-A)
	K -= temp * 2

	while K > 0:
		K -= 1
		x += 1

print(max(x, n))

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
k, a, b = map(int, input().split())

cookie = 0

if a + 2 >= b or k + 1 < a:
    cookie = k + 1
else:
    action = int((k-(a-1))/2)
    cookie = b
    if action > 1:
        cookie += (action-1)*(b-a)
    if (k-(a-1))/2 > 0 and (k-(a-1))/2 - action > 0:
        cookie += 1

print('{}'.format(cookie))

Failing test case input:
3 3 6

Expected output:
4


Actual output:
7


Fixed submission (verdict: Accepted):
k, a, b = map(int, input().split())

cookie = 0

if a + 2 >= b or k + 1 < a:
    cookie = k + 1
else:
    action = int((k-(a-1))/2)
    cookie = a
    if action >= 1:
        cookie += action*(b-a)
    if (k-(a-1))/2 - action > 0:
        cookie += 1

print('{}'.format(cookie))

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
k,a,b=map(int,input().split())
if a+2>=b:print(k+1)
elif a>=k:print(k+1)
else:
    k-=a-1
    ans=a+(b-a)*k
    if k%2==1:print(ans+1)
    elif k%2==0:print(ans)


Failing test case input:
1011 0 3

Expected output:
1518


Actual output:
3036


Fixed submission (verdict: Accepted):
k,a,b=map(int,input().split())
if a+2>=b:print(k+1)
elif a>=k:print(k+1)
else:
    k-=(a+1)
    ans=b+(b-a)*(k
    if k%2==1:print(ans+1)
    elif k%2==0:print(ans)

Problem: p03131
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
k,a,b=map(int,input().split())
cnt=0
if b<a+2:
    print(k+1)
else:
    if k>=a+1:
        k-=a+1
        cnt+=b
        q,modulo=divmod(k,2)
        cnt+=q*b-q*a+modulo
        print(cnt)
    else:
        print(k)
    

Failing test case input:
3 3 6

Expected output:
4


Actual output:
3


Fixed submission (verdict: Accepted):
k,a,b=map(int,input().split())
cnt=0
if b<a+2:
    print(k+1)
else:
    if k>=a+1:
        k-=a+1
        cnt+=b
        q,modulo=divmod(k,2)
        cnt+=q*b-q*a+modulo
        print(cnt)
    else:
        print(k+1)

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
K,A,B=map(int,input().split())
bis=1
if K==1:
  bis+=1
elif A>=B-1 or K-A+1<=0:
  bis+=K
else:
  if (K-(A-1))%2==0:
    bis=A+int((B-A)*(K-(A-1)))
  else:
    bis=A+(B-A)*(K-(A-1))
print(bis)

Failing test case input:
1110 0 4

Expected output:
2221


Actual output:
4444


Fixed submission (verdict: Accepted):
K,A,B=map(int,input().split())
bis=1
if K==1:
  bis+=1
elif A>=B-1 or K-A+1<=0:
  bis+=K
else:
  if (K-(A-1))%2==0:
    bis=A+(B-A)*((K-(A-1))
  else:
    bis=A+(B-A)*((K-(A-1))
print(bis)
Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
k, a, b = [int(i) for i in input().split()]


sum = 0
if a >= b:
    
    sum = k + 1
else:
    
    diff = b - a
    if diff == 1:
        sum = k + 1
    elif diff == 2:
        sum = k + 1
    else:
        
        print("a")
        k = 1 + k - a
        if k % 2 == 0:
            sum = a + ((diff) * (k / 2))
        else:
            
            print("b")
            sum = a + ((diff) * ((k - 1) / 2)) + 1

print(sum)


Failing test case input:
7 2 6

Expected output:
14


Actual output:
a
14.0


Fixed submission (verdict: Accepted):
k, a, b = [int(i) for i in input().split()]

sum = 0
if a >= b:
    
    
    sum = k + 1
else:
    
    diff = b - a
    if diff == 1:
        sum = k + 1
    elif diff == 2:
        sum = k + 1
    elif diff >= 3:
        
        rest = 1 + k - a

        if rest >= 0:
            if rest % 2 == 0:
                sum = a + ((diff) * int(rest / 2))


            else:
                
                sum = a + ((diff) * int((rest - 1) / 2)) + 1


        else:
            sum = k + 1
                
print(int(sum))

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
K,A,B = map(int,input().split())

if K < A+2 or B <= A+2:
  print(K+1)
  exit(0)
  
K -= A - 1
p,q = divmod(K,2)
ans = (B-A) * p + q
print(ans)


Failing test case input:
1011 1 4

Expected output:
1517


Actual output:
1516


Fixed submission (verdict: Accepted):
K,A,B = map(int,input().split())

if K < A+1 or B <= A+2:
  print(K+1)
  exit(0)
  
K -= A - 1
ans = A
p,q = divmod(K,2)
ans += (B-A) * p + q
print(ans)

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
K,A,B = map(int, input().split())
cookie = 0

if K < A + 1 or B - A <  A -1 or B - A < 3 or B < 3:
    print(K + 1)

else:
    cookie = B
    K = K-A-1

    if K%2==0:
        cookie += (B-A)* math.floor(K/2)
        print(cookie)
    else:
        cookie += (B-A)*math.floor((K-1)/2)
        print(cookie + 1)


Failing test case input:
0100 -1 2

Expected output:
152


Actual output:
101


Fixed submission (verdict: Accepted):
import math
K,A,B = map(int, input().split())
cookie = 0

if abs(A-B) <= 1:
    print(K + 1)
elif A > B:
    print(K + 1)

else:
    cookie = B
    K = K-A-1

    if K%2==0:
        cookie += (B-A)* math.floor(K/2)
        print(cookie)
    else:
        cookie += (B-A)*math.floor((K-1)/2)
        print(cookie + 1)

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
K,A,B=list(map(int,input().split()))
hand=0
if B-A<=2:
    print(K+1)
    exit()
K=K-A+1
print(K)
if K%2==1:
    hand=1+int((K-1)/2)*(B-A)
else:
    hand=int(K/2)*(B-A)
print(hand+A)

Failing test case input:
1111 0 3

Expected output:
1668


Actual output:
1112
1668


Fixed submission (verdict: Accepted):
K,A,B=list(map(int,input().split()))
hand=0
if B-A<=2:
    print(K+1)
    exit()
K=K-A+1
if K%2==1:
    hand=1+int((K-1)/2)*(B-A)
else:
    hand=int(K/2)*(B-A)
print(hand+A)
Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
K,A,B = map(int, input().split())
rest = K- (A-1)
b = A + (B-1)*rest
print(max(K+1, b))

Failing test case input:
1001 1 6

Expected output:
2502


Actual output:
5006


Fixed submission (verdict: Accepted):
K,A,B = map(int, input().split())
rest = K- (A-1)
b=0
if rest>0:
    b = A + (B-A)*(rest
print(max(K+1, b))

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
k,a,b = map(int,input().split())
print(k + 1 if a + 1>= b else b + ((k - (a + 1)) % 2) +  (b - a) * int((k - (a + 1)) / 2))

Failing test case input:
3 3 6

Expected output:
4


Actual output:
7


Fixed submission (verdict: Accepted):
k,a,b = map(int,input().split())
print(k + 1 if a + 1>= b or k < a + 1 else b + ((k - (a + 1)) % 2) +  (b - a) * int((k - (a + 1)) / 2))

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
K,A,B=map(int,input().split())
bis=1
if K==1:
  bis+=1
elif A>=B-1 or K-A+1<=0:
  bis+=K
else:
  if (K-(A-1))%2==0:
    bis=A+(B-A)*(K-(A-1))
  else:
    bis=A+(B-A)*(K-(A-1))
print(bis)

Failing test case input:
1001 1 6

Expected output:
2502


Actual output:
5006


Fixed submission (verdict: Accepted):
K,A,B=map(int,input().split())
bis=1
if K==1:
  bis+=1
elif A>=B-1 or K-A+1<=0:
  bis+=K
else:
  if (K-(A-1))%2==0:
    bis=A+(B-A)*((K-(A-1))
  else:
    bis=A+(B-A)*((K-(A-1))
print(bis)

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
K,A,B = (int(x) for x in input().split())
ans = 1

if B-A>2:
    if K>= A-1:
        ans += A - 1
        K -= A - 1
        if K >= 2:
            ans = ans + (B - A) * (K / 2)
            K = K % 2;

ans += K

print(ans)



Failing test case input:
1010 1 4

Expected output:
1516


Actual output:
1516.0


Fixed submission (verdict: Accepted):
K,A,B = (int(x) for x in input().split())
ans = 1

if B-A>2:
    if K>= A-1:
        ans += A - 1
        K -= A - 1
        if K >= 2:
            ans = ans + (B - A) * (K 
            K = K % 2

ans += K

print(ans)

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
K,A,B = (int(x) for x in input().split())

if A >= B-1:
    ans = 1+K
else:
    if K <= A:
        ans = 1+K
    else:
        if (K-A+1)%2==0:
            ans = int(A+(B-A)*(K-A+1)/2)
        else:
            ans = int(1+A+(B-A)*(K-A)/2)
print(ans)


Failing test case input:
314159265 35897932 384626433

Expected output:
48518828981938099

Actual output:
48518828981938096


Fixed submission (verdict: Accepted):
K,A,B = (int(x) for x in input().split())

if A >= B-1:
    print(1+K)
else:
    if K <= A:
        print(1+K)
    else:
        if (K-A+1)%2==0:
            print(int(A+(B-A)*int((K-A+1)/2)))
        else:
            print(int(1+A+(B-A)*int((K-A)/2)))
Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
K, A, B = map(int, input().split())

def f():
    
    a = A - 1
    
    b = K - a
    
    d, m = divmod(b, 2)
    print(a,b, d, m)
    return A + (B - A) * d + m

def g():
    return 1 + K

if (A + 2) < B:
    print(f())
else:
    print(g())


Failing test case input:
1111 0 3

Expected output:
1668


Actual output:
-1 1112 556 0
1668


Fixed submission (verdict: Accepted):
K, A, B = map(int, input().split())

def f():
    
    a = A - 1
    
    b = K - a
    
    d, m = divmod(b, 2)
    return A + (B - A) * d + m

def g():
    return 1 + K

if (A + 2) < B:
    print(f())
else:
    print(g())

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
k,a,b = map(int,input().split())
if a+2 >=b:
    print(k+1)
else:
    if (k-a+1) % 2 == 0:
        print(str(((k-a+1)/2)*(b-a) + a ))
    else:
        print(str((k-a)/2*(b-a) + a +1))

Failing test case input:
407766107 9307229 25447105

Expected output:
3215538450316794


Actual output:
3215538450316794.0


Fixed submission (verdict: Accepted):
k,a,b = map(int,input().split())
from decimal import *
if b-a<=2 or k <= a:
    print(k+1)
else:
    if (k-a+1) % 2 == 0:
        print (Decimal(b-a)*Decimal(k-a+1)/2  + a )
    else:
        print (Decimal(b-a)*Decimal(k-a)/2  + a  + 1)

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    K, A, B = map(int, input().split())
    ans = 0

    if A >= B:
        ans = K + 1
    else:

        if abs(A - B) <= 2:
            ans = K + 1

        else:
            if K >= A - 1 + 2:
                ans += B
                K -= (A + 1)

                if abs(A - B) <= 2:
                    r, m = divmod(K, A)
                    ans += r * B + m
                else:
                    r, m = divmod(K, 2)
                    ans += (B - A) * r + m

    print(ans)

if __name__ == "__main__":
    main()

Failing test case input:
3 3 6

Expected output:
4


Actual output:
0


Fixed submission (verdict: Accepted):
def main():
    K, A, B = map(int, input().split())
    ans = 0

    if A >= B:
        ans = K + 1
    else:

        if abs(A - B) <= 2:
            ans = K + 1

        else:
            if K >= A - 1 + 2:
                ans += B
                K -= (A + 1)

                if abs(A - B) <= 2:
                    r, m = divmod(K, A)
                    ans += r * B + m
                else:
                    r, m = divmod(K, 2)
                    ans += (B - A) * r + m
            else:
                ans = K + 1

    print(ans)

if __name__ == "__main__":
    main()

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

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


if(b>a+2):

	rem = k-a+1
	if(rem%2==0):
		n=(b-a)*rem
	else:
		n=(b-a)*rem
	print(n)
	
else:
	print(1+k)

Failing test case input:
0100 -1 2

Expected output:
152


Actual output:
306


Fixed submission (verdict: Accepted):
import math

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


if(b>a+2):

	rem = k-a+1
	if(rem%2==0):
		n=(b-a)*rem
	else:
		n=(b-a)*(rem
	print(n)
	
else:
	print(1+k)
Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
K,A,B = map(int, input().split())
cookie = 0

if K < A + 1 or B - A <  A - 2 or B - A < 3 :
    print(K + 1)

else:
    cookie = B
    K = K-A-1

    if K%2==0:
        cookie += (B-A)* math.floor(K/2)
        print(cookie)
    else:
        cookie += (B-A)*math.floor((K-1)/2)
        print(cookie + 1)


Failing test case input:
407766107 9307229 14836778

Expected output:
1101648954500241


Actual output:
407766108


Fixed submission (verdict: Accepted):
import math
K,A,B = map(int, input().split())
cookie = 0

if abs(A-B) <= 1:
    print(K + 1)
elif A > B:
    print(K + 1)

else:
    cookie = B
    K = K-A-1

    if K%2==0:
        cookie += (B-A)* math.floor(K/2)
        print(cookie)
    else:
        cookie += (B-A)*math.floor((K-1)/2)
        print(cookie + 1)

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
k,a,b=map(int,input().split())
ans=0
if a+1<k and b>a+2:
  k=k-(a+1)
  ans+=b
  mul,mod=divmod(k,2)
  ans+=(mul)*(b-a)
  ans+=mod
  print(ans)
else:
  print(ans+k)


Failing test case input:
4727 13 0

Expected output:
4728


Actual output:
4727


Fixed submission (verdict: Accepted):
k,a,b=map(int,input().split())
ans=0
if a+1<=k and b>a+2:
  k=k-(a+1)
  ans+=b
  mul,mod=divmod(k,2)
  ans+=(mul)*(b-a)
  ans+=mod
  print(ans)
else:
  print(1+k)

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
K,A,B = (int(i) for i in input().split())
if A+2>=B:
    print(1+K)
else:
    Bis = A
    K-=A-1
    print(K)
    Bis += int(K/2)*(B-A)
    if(K)%2==1:
        Bis+=1
    print(Bis)



Failing test case input:
0010 -2 1

Expected output:
17


Actual output:
13
17


Fixed submission (verdict: Accepted):
K,A,B = (int(i) for i in input().split())
if A+2>=B:
    print(1+K)
else:
    Bis = A
    K-=A-1
    Bis += int(K/2)*(B-A)
    if(K)%2==1:
        Bis+=1
    print(Bis)

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
K, A, B = map(int, input().split())



bis = 1
ad = B - A
starts = 2
if (B - A) > 1:
    bis = A
    K -= (A - 1)
    if K <= 1:
        print(K + 1)
        exit(0)
    mades = int(K / 2)
    if (K /2- mades) != 0:
        bis += 1
    bis += (mades * ad)
    print(bis)
    exit(0)
else:
    print(K + 1)
    exit(0)


Failing test case input:
3 3 6

Expected output:
4


Actual output:
2


Fixed submission (verdict: Accepted):
K, A, B = map(int, input().split())



bis = 1
ad = B - A
starts = 2
if (B - A) > 1:
    bis = A
    K -= (A - 1)
    if K <= 1:
        print(bis + 1)
        exit(0)
    mades = int(K / 2)
    if (K /2- mades) != 0:
        bis += 1
    bis += (mades * ad)
    print(bis)
    exit(0)
else:
    print(K + 1)
    exit(0)
Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
K,A,B = map(int,input().split())

if K < (A+B+2) or B <= A+2:
  print(K+1)
  exit(0)
  
K -= A - 1
p,q = divmod(K,2)
ans = B * p + q
print(ans)

Failing test case input:
0010 -2 1

Expected output:
17


Actual output:
7


Fixed submission (verdict: Accepted):
K,A,B = map(int,input().split())

if K < A+1 or B <= A+2:
  print(K+1)
  exit(0)
  
K -= A - 1
ans = A
p,q = divmod(K,2)
ans += (B-A) * p + q
print(ans)

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math


def solution(K, A, B):
    if A >= B - 2:
        return K
    iterTmp = (K - (A - 1))
    return math.floor(iterTmp / 2) * (B - A) + A + iterTmp % 2


if __name__ == "__main__":
    K, A, B = [int(s) for s in input().split(' ')]
    print(solution(K, A, B))


Failing test case input:
6288709 48971066 38769

Expected output:
6288710


Actual output:
6288709


Fixed submission (verdict: Accepted):
import math


def solution(K, A, B):
    if A >= B - 2:
        return K + 1
    iterTmp = K - (A - 1)
    return math.floor(iterTmp / 2) * (B - A) + A + iterTmp % 2


if __name__ == "__main__":
    K, A, B = [int(s) for s in input().split(' ')]
    print(solution(K, A, B))

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


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

money = 0
cookie = 1
move = k

if a + 1 < b:
    cookie += b
    if int((k-a)/2) > 1:
        cookie += (int((k-a)/2)*(b-a))
    if ((k-a)/2) - int((k-a)/2) > 0:
        cookie -= 1
else:
    cookie += k

print('{}'.format(cookie))

Failing test case input:
296771207 9307229 25447105

Expected output:
2319816489000594


Actual output:
2319816505140470


Fixed submission (verdict: Accepted):
k, a, b = map(int, input().split())

cookie = 0

if a + 2 >= b or k + 1 < a:
    cookie = k + 1
else:
    action = int((k-(a-1))/2)
    cookie = a
    if action >= 1:
        cookie += action*(b-a)
    if (k-(a-1))/2 - action > 0:
        cookie += 1

print('{}'.format(cookie))
Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    K, A, B = map(int, input().split())
    ans = 0

    if A >= B:
        ans = K + 1
    else:
        if K >= A - 1 + 2:
            ans += B
            K -= A + 1

            if abs(A - B) <= 2:
                r, m = divmod(K, A)
                ans += r * B + m
            else:
                r, m = divmod(K, 2)
                ans += (B - A)* r + m

        else:
            ans += K + 1

    print(ans)

if __name__ == "__main__":
    main()

Failing test case input:
1100 1 3

Expected output:
1101


Actual output:
3297


Fixed submission (verdict: Accepted):
def main():
    K, A, B = map(int, input().split())
    ans = 0

    if A >= B:
        ans = K + 1
    else:

        if abs(A - B) <= 2:
            ans = K + 1

        else:
            if K >= A - 1 + 2:
                ans += B
                K -= (A + 1)

                if abs(A - B) <= 2:
                    r, m = divmod(K, A)
                    ans += r * B + m
                else:
                    r, m = divmod(K, 2)
                    ans += (B - A) * r + m
            else:
                ans = K + 1

    print(ans)

if __name__ == "__main__":
    main()

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
k, a, b = map(int, input().split())

if a + 2 >= b:
    cookie = k + 1 
else:
    action = int((k-(a-1))/2)
    cookie = b
    if action > 1:
        cookie += (action-1)*(b-a)
    if ((k-(a-1))/2) - action > 0:
        cookie += 1

print('{}'.format(cookie))

Failing test case input:
3 3 6

Expected output:
4


Actual output:
7


Fixed submission (verdict: Accepted):
k, a, b = map(int, input().split())

cookie = 0

if a + 2 >= b or k + 1 < a:
    cookie = k + 1
else:
    action = int((k-(a-1))/2)
    cookie = a
    if action >= 1:
        cookie += action*(b-a)
    if (k-(a-1))/2 - action > 0:
        cookie += 1

print('{}'.format(cookie))

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
K,A,B = map(int,input().split())
if A+2 >= B:
	print(1+K)
elif K <= A:
	print(1+K)
else:
	new_K = K-A
	print(new_K)
	if new_K % 2 == 1:
		temp_K = int((new_K+1)/2)
		print(temp_K)
		print(int(temp_K*B - (temp_K-1)*A))
	else:
		print(int((new_K/2)*B - ((new_K/2)-1)*A + 1))
		
	

Failing test case input:
407766107 9307229 25447105

Expected output:
3215538450316794


Actual output:
398458878
3215538450316794


Fixed submission (verdict: Accepted):
K,A,B = map(int,input().split())
if A+2 >= B:
	print(1+K)
elif K <= A:
	print(1+K)
else:
	new_K = K-A
	if new_K % 2 == 1:
		temp_K = int((new_K+1)/2)
		print((temp_K*B - (temp_K-1)*A))
	else:
		temp_K = int(new_K/2)
		print((int(temp_K*B - (temp_K-1)*A + 1)))
Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
K,A,B = map(int,input().split())

ans = 1
cnt = 0
if A + 1 < B:
    cnt += A + 1
    ans = B
else:
    print(ans + K)
    exit()

if ans >= B:
    k = int((K-cnt) / 2)
    ans += k * (B - A)
    c = int((K-cnt) % 2)
    print(ans+c)
else:
    print(ans + K)


Failing test case input:
3 3 6

Expected output:
4


Actual output:
7


Fixed submission (verdict: Accepted):
K,A,B = map(int,input().split())

ans = 1
cnt = 0

if A + 1 < B and K >= A+1:
    cnt += A + 1
    ans = B
else:
    print(ans + K)
    exit()

if ans >= B:
    k = int((K-cnt) / 2)
    ans += k * (B - A)
    c = int((K-cnt) % 2)
    print(ans+c)
else:
    print(ans + K)

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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

bis = 1


if k <= 1 or b <= a + 2:
    print(1 + k)
    exit()
else:
    bis = b
    k = k - ( a + 1)
    if not k == 0:
        bis += int(k / 2) * (b - a) + k % 2

print(bis)

Failing test case input:
3 3 6

Expected output:
4


Actual output:
7


Fixed submission (verdict: Accepted):

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

bis = 1

if k <= 1 or b <= a + 2 or k < a + 1:
    print(1 + k)
    exit()
else:
    bis = b
    k = k - ( a + 1)
    if not k == 0:
        bis += int(k / 2) * (b - a) + k % 2

print(bis)

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
K,A,B=map(int,input().split())
bis=1
if K==1:
  bis+=1
elif A>=B-1 or K-A+1<=0:
  bis+=K
else:
  if int((K-(A-1)))%2==0:
    bis=A+(B-A)*(K-(A-1))
  else:
    bis=A+(B-A)*(K-(A-1))
print(bis)

Failing test case input:
0010 -2 1

Expected output:
17


Actual output:
37


Fixed submission (verdict: Accepted):
K,A,B=map(int,input().split())
bis=1
if K==1:
  bis+=1
elif A>=B-1 or K-A+1<=0:
  bis+=K
else:
  if (K-(A-1))%2==0:
    bis=A+(B-A)*((K-(A-1))
  else:
    bis=A+(B-A)*((K-(A-1))
print(bis)

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
K,A,B=input().split()
K=int(K)
A=int(A)
B=int(B)

def solve(A,B,K):
    if A>=B-1:
        return K+1
    K-=(A-1)
    if K%2==0:
        return int(A+(B-A)*(K/2))
    else:
        return int(A+(B-A)*((K-1)/2)+1)

print(solve(A,B,K))


Failing test case input:
314159265 35897932 384626433

Expected output:
48518828981938099

Actual output:
48518828981938096


Fixed submission (verdict: Accepted):
K,A,B=input().split()
K=int(K)
A=int(A)
B=int(B)

def solve(A,B,K):
    if A>=B-1 or A-1>=K:
        return K+1
    K-=(A-1)
    if K%2==0:
        return int(A+(B-A)*int(K/2))
    else:
        return A+(B-A)*int((K-1)/2)+1

print(solve(A,B,K))
Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


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

money = 0
cookie = 1
move = k

if a + 1 < b:
    cookie += b
    if int((k-(a-1))/2) > 1:
        cookie += (int((k-a)/2)*(b-a))
    if ((k-a)/2) - int((k-a)/2) > 0:
        cookie -= 1
else:
    cookie += k

print('{}'.format(cookie))

Failing test case input:
407766107 9307229 14836778

Expected output:
1101648954500241


Actual output:
1101648960029790


Fixed submission (verdict: Accepted):
k, a, b = map(int, input().split())

cookie = 0

if a + 2 >= b or k + 1 < a:
    cookie = k + 1
else:
    action = int((k-(a-1))/2)
    cookie = a
    if action >= 1:
        cookie += action*(b-a)
    if (k-(a-1))/2 - action > 0:
        cookie += 1

print('{}'.format(cookie))

Problem: p03131
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
if __name__ == "__main__":
    K,A,B = map(int,input().split())
    
    if A >= B:
        print(1 + K)
    elif B - A == 1:
        print(1 + K)
    else :
        if K <= A - 1:
            print (1 + K)
        else:
            K -= A - 1
            if K % 2 == 0:
                print (int(A + (K / 2) * (B - A)))
            else:
                print (int(A + ((K - 1) / 2) * (B - A) + 1))

Failing test case input:
314159265 35897932 384626433

Expected output:
48518828981938099

Actual output:
48518828981938096


Fixed submission (verdict: Accepted):
if __name__ == "__main__":
    K,A,B = map(int,input().split())
    
    if B - A <= 2:
        print(K + 1)
    else :
        
        if K <= A-1:
            print(1 + K)
        else:
            
            rest = K - (A - 1)
            if rest < 2:
                print(1 + K)
            else:
                q,r = divmod(rest,2)
                print(A + q * (B - A) + r)
Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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()


Failing test case input:
-34 15

Expected output:
-19


Actual output:
49


Fixed submission (verdict: Accepted):
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()

Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = [int(i) for i in input().split()]
List = [A+B, A-B, B-A, A*B]
List = sorted(List)
print(List[3])

Failing test case input:
-7 2

Expected output:
-5


Actual output:
9


Fixed submission (verdict: Accepted):
A, B = [int(i) for i in input().split()]
List = [A+B, A-B, A*B]
List = sorted(List)
print(List[2])

Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
max(a + b, a - b, a * b)


Failing test case input:
297 -1

Expected output:
298


Actual output:

Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
print(max(a + b, a - b, a * b))

Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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])

Failing test case input:
-34 15

Expected output:
-19


Actual output:
49


Fixed submission (verdict: Accepted):
li = list(map(int,input().split()))
ans = [li[0]+li[1],li[0]-li[1],li[0]*li[1]]
ans.sort()
print(ans[2])

Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
print(a + b, a - b, a * b)

Failing test case input:
38 -1

Expected output:
39


Actual output:
37 39 -38


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
print(max(a + b, a - b, a * b))

Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)


Failing test case input:
239 0

Expected output:
239


Actual output:
0


Fixed submission (verdict: Accepted):
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)

Problem: p03337
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
A, B = map(int,input().split())

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

Failing test case input:
-9 -6

Expected output:
54


Actual output:
-15 -3 54


Fixed submission (verdict: Accepted):
A, B = map(int,input().split())

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

Problem: p03337
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b = map(int,input().split())
max(a+b,a-b,a*b)

Failing test case input:
-11 -3

Expected output:
33


Actual output:

Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
print(max(a+b,a-b,a*b))
Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
212 0

Expected output:
212


Actual output:

Fixed submission (verdict: Accepted):
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)

Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = list(map(int, input().split()))
SumDif = abs(x[0]) + abs(x[1])
Mul = x[0] * x[1]
print(max(Mul,SumDif))


Failing test case input:
-91 -1

Expected output:
91


Actual output:
92


Fixed submission (verdict: Accepted):
x = list(map(int, input().split()))

Sum = x[0] + x[1]
Dif = x[0] - x[1]
Mul = x[0] * x[1]
print(max(Mul,Sum,Dif))

Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)



Failing test case input:
-34 17

Expected output:
-17


Actual output:
0


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
ans = -100000
if ans < a+b: 
    ans = a+b
if ans < a-b: 
    ans = a-b
if ans < a*b:
    ans = a*b
print(ans)

Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
print([a+b, a-b, a*b])

Failing test case input:
297 0

Expected output:
297


Actual output:
[297, 297, 0]


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
print(max([a+b, a-b, a*b]))

Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
c=[a-b,b-a,a*b]
c.sort()
print(c[2])

Failing test case input:
-42 1

Expected output:
-41


Actual output:
43


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
c=[a+b,a-b,a*b]
c.sort()
print(c[2])

Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = [int(x) for x in input().split()]
ans = max([a+b, a-b, a*b])

Failing test case input:
-11 -3

Expected output:
33


Actual output:

Fixed submission (verdict: Accepted):
a,b = [int(x) for x in input().split()]
ans = max([a+b, a-b, a*b])
print(ans)

Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)


Failing test case input:
133 0

Expected output:
133


Actual output:

Fixed submission (verdict: Accepted):
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)
else:
    print(add)
Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split())
print(max(abs(a)+abs(b),a*b))

Failing test case input:
-34 17

Expected output:
-17


Actual output:
51


Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
print(max(a+b,a-b,a*b))

Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


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


Failing test case input:
297 0

Expected output:
297


Actual output:
0


Fixed submission (verdict: Accepted):


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 and minus > seki:
    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))

Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
print(max(a+b,a-b,a+b))

Failing test case input:
-13 -9

Expected output:
117


Actual output:
-4


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
print(max(a+b,a-b,a*b))

Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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()

Failing test case input:
-17 -10

Expected output:
170


Actual output:
-27


Fixed submission (verdict: Accepted):
def Add_Sub_Mul(a , b):

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

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

if __name__ == '__main__':
    main()

Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
-91 -1

Expected output:
91


Actual output:
-90


Fixed submission (verdict: Accepted):
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)

Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
-34 17

Expected output:
-17


Actual output:
0


Fixed submission (verdict: Accepted):
A, B = map(int, input().split())
a = A + B
if A * B > a:
    a = A * B
if A - B > a:
	a = A - B
print(a)
Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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])

Failing test case input:
-115 1

Expected output:
-114


Actual output:
-116


Fixed submission (verdict: Accepted):
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])

Problem: p03337
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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)

Failing test case input:
297 0

Expected output:
297


Actual output:
0


Fixed submission (verdict: Accepted):
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)

Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
c=[a+b,a*b,a-b]
print(sum(c))

Failing test case input:
38 -2

Expected output:
40


Actual output:
0


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
c=[a+b,a-b,a*b]
print(max(c))

Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
297 0

Expected output:
297


Actual output:
0


Fixed submission (verdict: Accepted):
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)

Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)
   

Failing test case input:
297 0

Expected output:
297


Actual output:
0


Fixed submission (verdict: Accepted):
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)

Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int, input().split())
print(min(a+b, a-b, a*b))


Failing test case input:
-59 1

Expected output:
-58


Actual output:
-60


Fixed submission (verdict: Accepted):
a,b = map(int, input().split())
print(max(a+b, a-b, a*b))

Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b=map(int, input().split())
print(a+b, a-b, a*b)

Failing test case input:
-31 1

Expected output:
-30


Actual output:
-30 -32 -31


Fixed submission (verdict: Accepted):
a, b=map(int, input().split())
print(max(a+b, a-b, a*b))
Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
297 0

Expected output:
297


Actual output:
0


Fixed submission (verdict: Accepted):
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)

Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
print(max(a+b,abs(a-b),a*b))

Failing test case input:
-34 15

Expected output:
-19


Actual output:
49


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
print(max(a+b,a-b,a*b))

Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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]



Failing test case input:
-21 -3

Expected output:
63


Actual output:

Fixed submission (verdict: Accepted):
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,k])
print(ans)

Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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

Failing test case input:
57 -4

Expected output:
61


Actual output:
-228


Fixed submission (verdict: Accepted):

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

Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split())
print(min(a+b,a-b,a*b))

Failing test case input:
-156 -3

Expected output:
468


Actual output:
-159


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
print(max(a+b, a-b, a*b))

Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
239 0

Expected output:
239


Actual output:
0


Fixed submission (verdict: Accepted):
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)

Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B=map(int,input().split(' '))
print(max(A*B,A+B))

Failing test case input:
58 -4

Expected output:
62


Actual output:
54


Fixed submission (verdict: Accepted):
A,B=map(int,input().split(' '))
print(max(A*B,A+B,A-B))

Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x, y = [int(s) for s in input().split()]
max([x + y, x - y, x * y])


Failing test case input:
58 -4

Expected output:
62


Actual output:

Fixed submission (verdict: Accepted):
x, y = [int(s) for s in input().split()]
print(max([x + y, x - y, x * y]))

Problem: p03337
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split())
max(a+b,a-b,a*b)

Failing test case input:
-9 -4

Expected output:
36


Actual output:

Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
print(max(a+b,a-b,a*b))