TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
A, B = map(int, input().split())
if A>B:
  print("2A-1")
if A<B:
  print("2B-1")
if A==B:
  print("A+B")

A, B = map(int, input().split())
if A>B:
  print("2A-1")
if A<B:
  print("2B-1")
if A==B:
  print("A+B")
A=3
B=5

A=int(input())
B=int(input())
if A>B:
  print("2A-1")
if A<B:
  print("2B-1")
if A==B:
  print("A+B")

if A>B:
  print("2A-1")
if A<B:
  print("2B-1")
if A==B:
  print("A+B")

A, B = map(int, input().split())
if A>B:
  print(2*A-1)
if A<B:
  print(2*B-1)
if A==B:
  print(A+B)

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
coin = 0
for i in range(0,2):
    if a > b:
        coin += a
        a = a-1
    elif b > a:
        coin += b
        b = b-1
    else:
        coin += a
        a = a-1
print(coin)

a,b=map(int,input().split())
coin = 0
for i in range(0,2):
    if a > b:
        coin += a
        a = a-1
    elif b > a:
        coin += b
        b = b-1
    else:
        coin += a
        a = a-1
print(coin)

Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
input = input()
a,b = [int(x) for x in input]

if a > b:
  print(a+a-1)
elif a == b:
  print(a+a)
else:
  print(b+b-1)

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

if a == b:
  print(a+b)
elif a > b:
  print(a+a-1)
else:
  print(b+b-1)


Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
a,b  = map(int,input().split())
ans = 0
if a=>b:
  ans += a
  a -= 1
else:
  ans += b
  b-=1

if a=>b:
  ans += a
  a -= 1
else:
  ans += b
  b-=1
  
 print(ans)

a,b  = map(int,input().split())
ans = 0
if a=>b:
  ans += a
  a -= 1
else:
  ans += b
  b-=1

if a=>b:
  ans += a
  a -= 1
else:
  ans += b
  b-=1
  
print(ans)


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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
a,b = map(int,input().split())
print((max(a,b)+max(max(a,b)-1,min(a,b)))

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

Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
N,K = map(int,input().split())
S = input()
if S[0] == '0':
  divide = []
else:
  divide = [0]
tmp = 1
for i in range(1,N):
  if S[i] == S[i-1]:
    tmp += 1
  else:
    divide += [tmp]
    tmp = 1
divide += [tmp]
le = len(divide)
zero = [0]*2*le + divide + [0]*2*le
su = [0]
for i in range(0,5*le):
  su += [su[-1]+zero[i]]
del su[0]
lle = len(su)
mxm = 0
for k in range(K,lle):
  if 2*k+1 >= lle:
    break
  cd = su[2*k+1] - su[2*k-2*K]
  if cd > mxm:
    mxm = cd
print(mxm)

#15:14
a = list(map(int,input().split()))
a.sort()
if a[0] == a[1]:
  print(2 * a[1])
else:
  print(2 * a[1] - 1)

Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
N = int(input())
H = list(map(int, input().split()))

_count=1
max_height=H[0]

for i in range(1,N):
    if max_height <= H[i]:
        _count +=1
        max_height = H[i]
print(_count)


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

if A==B:
    print(A*2)
else:
    print(2*max(A,B)-1)

Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
A, B = [int(i) for i input().split(' ')]
     
def f():
	res = 0
    if A > B and A - 1 > B:
    	res += A + A - 1
    elif B > A and B - 1 > A:
    	res += B + B - 1
    else:
    	res = A + B
    return res
f()


A, B = [int(i) for i in input().split(' ')]
     
def f():
    res = 0
    if A > B and A - 1 > B:
        res += A + A - 1
    elif B > A and B - 1 > A:
        res += B + B - 1
    else:
        res = A + B
    return res
f()


A, B = [int(i) for i in input().split(' ')]
     
def f():
    res = 0
    if A > B and A - 1 > B:
        res = A + A - 1
    elif B > A and B - 1 > A:
        res = B + B - 1
    else:
        res = A + B
    return res
print(f())


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
a,b = list(map(int,input().split()))
if a==b:
	print(a+b)
else:
	print(a*2+1 if a>b else b*2-1)

a,b = list(map(int,input().split()))
if a==b:
	print(a+b)
else:
	print(a*2-1 if a>b else b*2-1)

Verdicts: Wrong Answer

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
import sys

a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())

gap = [abs(a-e),abs(b-e),abs(c-e),abs(d-e)]

for i in range(len(gap)):
	if gap[i] > k:
		print(':(')
		sys.exit()
print('Yay!')

A,B = map(int,input().split())
target = list(range(1,A+1))
target.extend(list(range(1,B+1)))

target.sort(reverse=True)
print(target[0]+target[1])

Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
k = int(input().split(" ")[1])
s = input()

arr = []
if s[0] is "0": 
  arr.append(0)
arr.append(1)
for i in range(1,len(s)):
  if s[i-1] is s[i]:
    arr[-1] += 1
  else:
    arr.append(1)
if s[-1] is "0": 
  arr.append(0)

t = 2*k+1
if t>len(s):
  print(len(s))
else:
  temp = sum(arr[0:t])
  m = temp
  for i in range(2,len(arr)-t+1,2):
    m = max(m,temp-arr[i-2]-arr[i-1]+arr[i+t-2]+arr[i+t-1])
  print(m)
#print(arr)

arr = list(map(int,input().split(" ")))
a = arr[0]
b = arr[1]

if a==b:
  print(2*a)
else:
  print(2*max(a,b)-1)

Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
A,B=[int(e) for e in input()]
print(max([A+A-1,A+B,B+B-1]))



A,B=[int(e) for e in input().split(' ')]
print(max([A+A-1,A+B,B+B-1]))



Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
a = input()
b = input()
max1 = max(a,b)
max2 = max(min(a,b),max(a,b)-1)

return max1 + max2


a = input()
b = input()
max1 = max(a,b)
max2 = max(min(a,b),max(a,b)-1)
 
print(max1 + max2)

a = int(input())
b = int(input())
max1 = max(a,b)
max2 = max(min(a,b),max(a,b)-1)
print(max1 + max2)

a = input()
b = input()
max1 = max(a,b)
max2 = max(min(a,b),max(a,b)-1)
print(max1 + max2)

a,b=map(int, input().split()) 
max1 = max(a,b)
max2 = max(max(a,b), min(a,b)-1)

print(max1+max2)

a,b=map(int, input().split()) 
max1 = max(a,b)
max2 = max(min(a,b), max(a,b)-1)
 
print(max1+max2)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
a, b = list(map(int, input().split()))

if a == b:
    print(a+b)
else:
    print(max(a, b)*2-1

a, b = list(map(int, input().split()))
 
if a == b:
    print(a+b)
else:
    print(max(a, b)*2-1)

Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
print("提出テスト")

a,b=(int(x) for x in input().split())
ans=0
for i in range(2):
    if a>b:
        ans+=a
        a-=1
    else:
        ans+=b
        b-=1
            
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
x,y=map(int,input().split())
if x!=y:
  print(max(x,y)*2)
else:
  print(x*2)

x,y=map(int,input().split())
print(max(max(x,y)*2-1,x*2)

x,y=map(int,input().split())
ans=0
ans=max(ans,x+x+1)
ans=max(ans,x+y)
ans=max(ans,x+y+1)
print(ans)

x,y=map(int,input().split())
print(max(max(x,y)*2-1,x*2))

x,y=map(int,input().split())
ans=0
ans=max(ans,x+x-1)
ans=max(ans,x+y)
ans=max(ans,y+y-1)
print(ans)

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
import numpy

s = list(input())
N = len(s)
count_A = 0
count_B = 0

for i in range(N):
    s[i] = int(str(s[i]))

A = numpy.empty(N)
B = numpy.empty(N)

for j in range(N):
    if j % 2 == 0 :
        A[j] = 1
        B[j] = 0
    else:
        A[j] = 0
        B[j] = 1

for k in range(N):
    A[k]=s[k]-A[k]
    B[k]=s[k]-B[k]
    if A[k] != 0:
        count_A = count_A + 1
    if B[k] != 0:
        count_B = count_B + 1

if count_A > count_B :
    print(count_B)
else :
    print(count_A)





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

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

Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
AB = int(stdin.readline().rstrip().split())
x = max(AB)
y = max(x-1, min(AB))
print(x + y)


A,B = map(int,input().split())
C = 0
C += max(A,B)
C += max(C-1,A,B)
print(C)

a,b = map(int,input().split())
c = 0
d = 0
e = 0
c += max(a,b)
d += c
d -= 1
e += min(a,b)
c += max(d,e)
print(c)	

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
class CreateList:
    def __init__(self, flg, cnt):
        self.flg = flg
        self.cnt = cnt
        
        

def main():
    
    n, k = map(int, input().split())
    s = list(map(int, input()))
    
    slist = []      
    bkflg = s[0]    
    scnt = 0        
    ecnt = 0        
    
    
    for i in s:
        ecnt += 1
        
        
        if i == bkflg:
           scnt += 1
        
        
        else:
            slist.append(CreateList(bkflg, scnt))
            scnt = 1
            bkflg = i
        
        
        if ecnt == len(s):
            slist.append(CreateList(bkflg, scnt))
    
    
    maxsum = 0      
    skipcnt = k     
    cursor = 0      
    cursorsum = 0   
    tmpcnt = 0      
    
    
    while tmpcnt <= len(slist) - 1:
        
        tmpcnt = cursor
        skipcnt = k
        cursorsum = 0
        
        
        while tmpcnt <= len(slist) - 1:
            if slist[tmpcnt].flg == 0:
                if skipcnt == 0:
                    break
                else:
                    skipcnt -= 1
            
            cursorsum = cursorsum + slist[tmpcnt].cnt
            tmpcnt += 1
        
        
        if maxsum < cursorsum:
            maxsum = cursorsum
        
        cursor += 1
        
    print(maxsum)
    
    
if __name__ == "__main__":
    main()

def main():
    l = list(map(int, input().split()))
    if max(l) != min(l):
        print((max(l) * 2) - 1)
    else:
        print(max(l) * 2)
    

if __name__ == "__main__":
  main()

Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
a,b = map(int, input().split())

r1 = max(a,b)

if r1 == 1:
  a -= 1
else:
  b -= 1
r2 = max(a,b)

print(r1+r2)

a,b = map(int, input().split())
 
r1 = max(a,b)
 
if r1 == a:
  a -= 1
else:
  b -= 1
r2 = max(a,b)
 
print(r1+r2)

Verdicts: Wrong Answer

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
a,b=map(int,input().split())
s=[2*a-1,a+b,2*b-1]
print(s.max())

a,b=map(int,input().split())
s=[2*a-1,a+b,2*b-1]
print(max(s)

a,b=map(int,input().split())
s=[2*a-1,a+b,2*b-1]
print(max(s))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
a,b = map(int, input().split()) 
aa = max(a,b)
bb = min(a,b)
if aa - 2 > bb:
    print(aa*2-1)
else:
    print(aa+bb)

a,b = map(int, input().split()) 
aa = max(a,b)
bb = min(a,b)
if aa - 1 > bb:
    print(aa*2-1)
else:
    print(aa+bb)

Verdicts: Wrong Answer

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
t = list(map(int,input().split()))
print(sum(t))

a,b = list(map(int,input().split()))
print ((a+a) if (a==b) else (max(a,b)*2-1))

Verdicts: Wrong Answer

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
a,b = map(int,input().split())
print(min(2*a-1, 2*b-1, a+b))

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


Verdicts: Wrong Answer

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
n, k = map(int, input().split())
s = list(input())


array = []
now_num = 1
count = 0
for i in s:
  if now_num == int(i):
    count += 1
  else:
    array.append(count)
    count = 1
    now_num = 1 - now_num

if count != 0:
  array.append(count)

if len(array) % 2 == 0:
  array.append(0)

res = 0
add = 2 * k + 1
ans = 0
left = 0
right = 0
tmp = 0

for i in range(len(array))[::2]:
    next_left = i
    next_right = min(i+add, len(array))
    
    while next_left > left:
        tmp -= array[left]
        left += 1
    while next_right > right:
        tmp += array[right]
        right += 1
    ans = max(tmp,ans)

print(ans)

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

ans =0
if a>=b:
  ans += a
  a = a-1
else:
  ans +=b
  b =b-1
  
if a>=b:
  ans += a
  a = a-1
else:
  ans +=b
  b =b-1
  
print(ans)

Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
N, K = list(map(int, input().split(' ')))
S = list(input())

size = []

now = S[0]
cnt = 1

END = False

for i in range(1,N,1):
  before = now
  now = S[i]
  if now == before:
    cnt += 1
  else:
    size.append(cnt)
    cnt = 1

size.append(cnt)

if 3*K > len(size):
  print(sum(size))
  END = True

max_sum = 0
max_sum2 = 0

if  S[0] == '0':
  start = 1
else:
  start = 0
  
if END:
  pass
else:
  for i in range(start,len(size),2):
    try:
      now_sum = sum(size[i:i+3*K])
      now_sum2 = sum(size[i+1:i+1+3*(K-1)])
      if max_sum < now_sum:
          max_sum = now_sum
      if max_sum2 < now_sum2:
          max_sum2 = now_sum2
    except:
      pass
  
  if max_sum2 > max_sum:
  	print(max_sum2)
  else:
    print(max_sum)


N, K = list(map(int, input().split(' ')))
S = list(input())

li = []
size = []

now = S[0]
cnt = 1

for i in range(1,N,1):
  before = now
  now = S[i]
  if now == before:
    cnt += 1
  else:
    li.append(before)
    size.append(cnt)
    cnt = 1

li.append(now)
size.append(cnt)

if 3*K > len(size):
  print(sum(size))
  END = True

max_sum = 0

if END:
  pass
else:
  for i in range(K):
    try:
      now_sum = sum(size[i:i+3*K])
      if max_sum < now_sum:
          max_sum = now_sum
    except:
      pass

  print(max_sum)

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

get_coin = 0

for _ in range(2):
  if A > B:
  	get_coin += A
  	A = A-1
  else:
    get_coin += B
    B = B-1
   
print(get_coin)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
A, B = (int(x) for x in input().split())

if A < B:
    print("{}".format(B + (B - 1)))
elif B > A:
    print("{}".format(A + (A - 1)))
else:
    print("{}".format(A + B))

A, B = (int(x) for x in input().split())

if A < B:
    print("{}".format(B + B - 1))
elif B > A:
    print("{}".format(A + A - 1))
else:
    print("{}".format(A + A))

A, B = (int(x) for x in input().split())

if A < B:
    print("{}".format(B + B - 1))
elif B > A:
    print("{}".format(A + A - 1))
else:
    print("{}".format(A + A))

A, B = (int(x) for x in input().split())

if A < B:
    print("{}".format(B + B - 1))
elif B > A:
    print("{}".format(A + A - 1))
else:
    print("{}".format(A + B))

A, B = (int(x) for x in input().split())

if A < B:
    print("{}".format(B + B - 1))
elif B < A:
    print("{}".format(A + A - 1))
else:
    print("{}".format(A + B))

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):

N, K = (int(i) for i in input().split())
S = list(str(input()))

L0 = []
L1 = []

pre = -1
now = -1
count = 1

for i in range(1,len(S)):
    pre = int(S[i-1])
    now = int(S[i])
    
    if pre != now:
        if pre == 1:
            L1.append(count)
        else:
            L0.append(count)
        count = 1
        continue
    
    count += 1
        
    
if now  == 1:
    L1.append(count)
else:
    L0.append(count)


if int(S[0]) == 0 and int(S[-1]) == 0:
    L1.append(0)
    L1.insert(0,0)

if int(S[0]) == 1 and int(S[-1]) == 0:
    L1.append(0)

if int(S[0]) == 0 and int(S[-1]) == 1:
    L1.insert(0,0)        

maxi = 0


for i in range(len(L1)-1):
    sum1 = sum(L1[i:i+K+1])
    sum0 = sum(L0[i:i+K])
    sum_ = sum0 + sum1
    if maxi < sum_ :
        maxi = sum_
        
if maxi == 0:
    maxi = 1
    
print(maxi)

A, B = (int(i) for i in input().split())  
coin = 0

if A >= B + 2:
    coin = A + (A-1)
elif A + 2 <= B:
    coin = B + (B-1)
else:
    coin = A + B
    
print(coin)
    

Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
A, B = map(int, input().split())

inputs = [A, B]
inputs.sort()

button1 = inputs[0]
inputs[0] -= 1
inputs.sort()

button2 = inputs[0]

print(button1 + button2)

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

inputs = [A, B]
inputs.sort()

button1 = inputs[1]
inputs[1] -= 1
inputs.sort()

button2 = inputs[1]

print(button1 + button2)


Verdicts: Wrong Answer

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
a = int(input())
b = int(input())


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

list = [x,y,z]

max = max(list)


print(max)


l = input().split()
a = int(l[0])
b = int(l[1])


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

list = [x,y,z]

max = max(list)


print(max)


Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
n = int(input())
h = [int(n) for n in input().split()]

a = 0
b = 1
ans = 1

for i in range(n.length-2):
    if n[a]<n[b]:
        ans += 1
    a += 1
    b += 1
print(ans)

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

goukei = 0
for i in range(2):
    if A>=B:
        goukei = goukei + A
        A = A - 1
        continue
    
    if B > A :
        goukei = goukei + B
        B = B - 1
        continue
        
print(goukei)

Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
arr = (input()).split()

for i,temp in enumerate(arr):
  arr[i] = int(arr[i])
  
result = 0
for i in range(2):
  result += max(arr)
  index = arr.index(mac(arr))
  arr[index] = arr[index] -1
  
print(result)

arr = (input()).split()

for i,temp in enumerate(arr):
  arr[i] = int(arr[i])
  
result = 0
for i in range(2):
  result += max(arr)
  index = arr.index(max(arr))
  arr[index] = arr[index] -1
  
print(result)


Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
A, B = map(int, input().split())
c = 0

for _ in range(2):
    print(A, B, max(A, B))
    c += max(A, B)
    if max(A, B) == A:
        A = A - 1
    elif max(A, B) == B:
        B = B - 1

print(c)

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

for _ in range(2):
    c += max(A, B)
    if max(A, B) == A:
        A = A - 1
    elif max(A, B) == B:
        B = B - 1

print(c)

Verdicts: Wrong Answer

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
A,B = map(int,input().split())
tmp=0

while tmp<3:
  if A > B:
    cnt+=A
    A-=1
  elif A < B:
    cnt+=B
    B-=1
  else:
    cnt+=A
   A-=1
print(cnt)
  

A,B = map(int,input().split())
tmp=0
cnt=0

while tmp<3:
  if A > B:
    cnt+=A
    A-=1
    tmp+=1
  elif A < B:
    cnt+=B
    B-=1
    tmp+=1
  else:
    cnt+=A
    A-=1
    tmp+=1
print(cnt)
  


A,B = map(int,input().split())
tmp=0
cnt=0

while tmp<3:
  if A > B:
    cnt+=A
    A-=1
    tmp+1
  elif A < B:
    cnt+=B
    B-=1
    tmp+1
  else:
    cnt+=A
    A-=1
    tmp+1
print(cnt)
  


A,B = map(int,input().split())
tmp=0
cnt=0

while tmp<3:
  if A > B:
    cnt+=A
    A-=1
  elif A < B:
    cnt+=B
    B-=1
  else:
    cnt+=A
   A-=1
print(cnt)
  


A,B = map(int,input().split())
tmp=0
cnt=0

while tmp<2:
  if A > B:
    cnt+=A
    A-=1
    tmp+=1
  elif A < B:
    cnt+=B
    B-=1
    tmp+=1
  else:
    cnt+=A
    A-=1
    tmp+=1
print(cnt)
  


Verdicts: Runtime Error

Wrong Answer

Time Limit Exceeded

Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
a,b=map(int,input().split())
print(print a*2 if a==b else max(a,b) * 2 -1)

a,b=map(int,input().split())
print( a*2 if a==b else max(a,b) * 2 -1)

Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
# coding:utf-8
n = int(input())
h = list(map(int, input().split()))
counter = 1


if max(h) == h[0]:
    print(counter)
else:
    for i in range(n):
        print(h[0:i+1])
        h_max = max(h[0:i+1])
        if (h[i] >= h_max) and (h[i] > h[0]):
            #print(h[i])
            counter += 1
    print(counter)


#coding:utf-8
a, b = map(int, input().split())
 
aa = 2*a - 1
ab = a + b
bb = 2*b - 1
 
print(max(aa, ab, bb))

Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
a,m=map(int,input().split())
if a==m:
  print(a*m)
else:
  print(a*m-1)

a,m=map(int,input().split())
if a==m:
  print(m*2)
else:
  print(max(a,m)*2-1)


Verdicts: Wrong Answer

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
s = list(input())
N = len(s)
cont = 0
for i in xrange(1,N):
    if s[i-1]==s[i]:
        cont += 1
        if s[i] == '0':
            del s[i]
            s.insert(i, '1')          
        else:
            del s[i]
            s.insert(i, '0')    
print(cont)

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

list= [A+A-1,B+B-1,A+B]
print(max(list))

Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
A, B = map(int,iput().split())

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

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

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

Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
a, b = list(map(int, input().split()))
if a == b:
  my_result = a + b
elif a > b:
  my_result = 2 * a + 1
else:
  my_result = 2 * b + 1
print(my_result)

a, b = list(map(int, input().split()))
if a == b:
  my_result = a + b
elif a > b:
  my_result = 2 * a - 1
else:
  my_result = 2 * b - 1
print(my_result)

Verdicts: Wrong Answer

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
a, b = list(map(int, input().split()))
max(a + a - 1, b + b - 1, a + b)

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

Verdicts: Wrong Answer

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
N = input()
H = [s for s in input().split()]

HIEST = H[0]
COUNT = 0
for i in H:

    if i >= HIEST:
        HIEST = i
        COUNT = COUNT+1

print(COUNT)

A,B=(int(x) for x in input().split())

if A == B:
    COINS=2*A
    
elif A > B:
    COINS=2*A-1

else:
    COINS=2*B-1

print(COINS)

Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
a,b = int(input().split())
ans = 0
if  a >= b:
  ans += a
  a -= 1
else:
  ans += b
  b -= 1
if  a >= b:
  ans += a
  a -= 1
else:
  ans += b
  b -= 1
print(ans)

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

Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
x, y = map(int, input().split())
ret = 0

if x == y:
    ret = x + y
else:
    if x > y:
        ret = x
        x - 1
    elif y > x:
        ret = y
        y - 1

    if x > y:
        ret = x
        x - 1
    elif y > x:
        ret = y
        y - 1

print(ret)

x, y = map(int, input().split())
ret = 0

if x == y:
    ret = x + y
else:
    if x > y:
        ret = x
        x - 1
    elif y > x:
        ret = y
        y - 1

    if x > y:
        ret += x
        x - 1
    elif y > x:
        ret += y
        y - 1

print(ret)

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

if a == b:
    coin = a + b
else:
    if a > b:
        coin = a
        a -= 1
    elif b > a:
        coin = b
        b -= 1

    if a > b:
        coin += a
        a -= 1
    elif b > a:
        coin += b
        b -= 1
    else:
        coin += a

print(coin)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
def main():
  if 'get_ipython' not in globals():  
    a,b = map(int,input().split())
  else:
    a,b = 3,11
    s = "test"
 
  def get(a,b, count, ans):
    if count == 0:
      return(ans)
    
    if a >= b:
      print(a, b, ans)
      return(get(a-1, b, count -1, ans + a))
    else:
      return(get(a, b-1, count -1, ans + b))
  
  print(get(a, b, 2, 0))
  
main()

def main():
  if 'get_ipython' not in globals():  
    a,b = map(int,input().split())
  else:
    a,b = 5,3
    s = "test"
 
  
  def get(a,b, count, ans):
    if count == 0:
      return(ans)
    
    if a >= b:
      return(get(a-1, b, count -1, ans + a))
    else:
      return(get(a, b-1, count -1, ans + b))
  
  print(get(a, b, 2, 0))
  
main()

Verdicts: Wrong Answer

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
a, b = map(int,input().split())
if a > b:
  	print(a * 2)
if b > a:
  	print(b * 2)
else:
  	print(a + b)
  	

S = list(input())

def counting(swt):
    cnt = 0
    for i in S:
        if swt == 0 and i == "1":
            i = "0"
            cnt += 1
            swt = 1
        elif swt == 1 and i == "0":
            i = "1"
            cnt += 1
            swt = 0
        else:
            if swt == 0:
                swt = 1
            else:
                swt = 0
    return cnt

print(min(counting(0),counting(1)))


a, b = map(int,input().split())
if a > b:
  	print(a + a - 1)
if b > a:
  	print(b + b - 1)
else:
  	print(a + b)
  	


a, b = map(int,input().split())
if a > b:
  	print(a * 2 - 1)
if b > a:
  	print(b * 2 - 1)
else:
  	print(a + b)
  	


a, b = map(int,input().split())
if a > b:
  	print(a + a - 1)
elif b > a:
  	print(b + b - 1)
else:
  	print(a + b)
  	


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
A, B = map(int, imput().split())
i = 0

for j in range(2):
	if A > B:
	  i += A
	  A -= 1
	else:
	  i += B
	  B -= 1

print(i)

A, B = map(int, input().split())
i = 0
 
for j in range(2):
	if A > B:
	  i += A
	  A -= 1
	else:
	  i += B
	  B -= 1
 
print(i)

Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
A, B = map(int, input().split())
tmp = 0
if abs(A-B) > 1:
    tmp = max(A,B)
    print(tmp*2-1)
else abs(A-B) == 1:
    print(A + B)

A, B = map(int, input().split())
if abs(A-B) > 1:
    tmp = max(A,B)
    print(tmp*2-1)
else abs(A-B) == 1:
    print(A + B)

A, B = map(int, input().split())
if abs(A-B) > 1:
    tmp = max(A,B)
    print(tmp*2-1)
else:
    print(A + B)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
max1 = 0

for i in range(3,21):
    A = i
    for j in range(3,21):
          B = j
          if A >= B:
              a = A
              b = B
          else:
              a = B
              b = A
          if a == b:
              ans = 2*a
          elif a == b + 1:
              ans = a + b
          elif a >= b + 2:
              ans = 2*a - 1
          if max1 <= ans:
              max1 = ans
print(max1)

max1 = 0

for i in range(3,21):
    for j in range(3,21):
          A = i
          B = j
          if A >= B:
              a = A
              b = B
          else:
              a = B
              b = A
          if a == b:
              ans = 2*a
          elif a == b + 1:
              ans = a + b
          elif a >= b + 2:
              ans = 2*a - 1
          if max1 <= ans:
              max1 = ans
print(max1)

A,B=map(int,input().split())
if A > B:
  ans = A + A - 1
if A < B:
  ans = B + B - 1
if A == B:
  ans = 2 * A
print(ans)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
n,m=map(int,input().split())

if n>m:
  print(n+n-1)
  
elif n<b:
  print(m+m-1)

  else:
  print(n+m)

a,b=map(int,input().split())
if a>b:
  print(a+a-1)
elif a<b:
  print(b+b-1)
else:
  print(a+b)

Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
A = 5
B = 7
if A > B:
    print(2 * A - 1)
elif A < B:
    print(2 * B - 1)
else:
    print(2 * A)

A = int(input())
B = int(input())
if A > B:
    print(2 * A - 1)
elif A < B:
    print(2 * B - 1)
else:
    print(2 * A)

A,B=(int(x) for x in input().split())
if A > B:
    print(2 * A - 1)
elif A < B:
    print(2 * B - 1)
else:
    print(2 * A)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
N , K = map(int,input().split())
S = str(input())
T =[] 
m = 1
for i in range(N-1):
    if S[i] == S[i + 1]:
        m = m + 1
    else:
        T.append(m)
        m = 1
T.append(m)
n = len(T)

left_1 = []
left_0 = []
if S[0] == str(1):
    if K >= (len(T) // 2):
        ans = N
    else:
        if len(T) % 2 == 0:
            i = 0
            while 2*i + 2*K + 1 <= n:
                left_1.append(sum(T[2*i:2*i+2*K+2]))
            left_1.append(sum(T[n - 2*K :n]))
            ans = max(left_1)
        else:
            i = 0
            while 2*i + 2*K + 1 <= n:
                left_1.append(sum(T[2*i:2*i+2*K+2]))
            ans = max(left_1)

else: # if S[0] == 0:
    if n % 2 == 0: 
        if K >= (len(T) / 2):
            ans = N
        else:
            left_0.append(sum(T[0:2*K]))
            i = 0
            while 2*i + 2*K + 2 <= n:
                left_1.append(sum(T[2*i + 1:2*i + 2*K + 3]))
            ans = max(left_0)
    
    else:
        if K >= (len(T)//2 + 1):
            ans = N
        else:
            left_0.append(sum(T[0:2*K]))
            left_0.append(sum(T[n-2*K:n]))
            while 2*i + 2*K + 2 <= n:
                left_1.append(sum(T[2*i + 1:2*i + 2*K + 3]))
            ans = max(left_0)

print (ans)
           


A,B = map(int,input().split())
if  A > B:
    print(2*A-1)
elif A == B:
    print(2*A)
else:
    print(2*B-1)
    

Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
a, b= (int(i) for i in input().split())  

def mod(a,b):
    c = a+a-1
    d = b+b-1
    e = a+b
    return max(c,d,e)
mod(a,b)

def mod(a,b):
    c = a+a-1
    d = b+b-1
    e = a+b
    return max(c,d,e)

a, b= (int(i) for i in input().split())  
c = a+a-1
d = b+b-1
e = a+b
print(max(c,d,e))

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
a,b=map(int, input().split())
x = 0
if a>b:
  x += a
  a =-1
else:
  x += b
  b =-1
x += max(a,b)

print(x)

a,b=map(int, input().split())
x = 0
if a>b:
  x += a
  a -=1
else:
  x += b
  b -=1

x += max(a,b)

print(x)


Verdicts: Wrong Answer

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
A, B = map(int, input().split())
int s
if A>=B:
    s=A
else:
    s=B
S = 2*s - 1
print(S)

A, B = map(int, input().split())
s = 0
if A>=B:
    s=A
    A=A-1
else:
    s=B
    B=B-1
S = s
if A>=B:
    s=A
    A=A-1
else:
    s=B
    B=B-1
S=S+s
print(S)

Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
a, b = int(_) for _ in input().split()
if a - 2 > b:
  print(a*2)
elif b - 2 > a:
  print(b*2)
else:
  print(a+b)

a, b = (int(_) for _ in input().split())
if a - 2 >= b:
  print(a*2 -1)
elif b - 2 >= a:
  print(b*2 -1)
else:
  print(a+b)

Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
c=[]
a,b=map(int,input().split())
c[0]=a
c[1]=b


for i in range(2):
  
  d+=max(c)
  max(c)=d-1
print(d)

a=list(map(int,input().split()))
for i in range(2):
  
  b+=max(a)
  max(a)=max(a)-1
print(b)

a,b=map(int,input().split())
c=0
for i in range(2):
    c+=max(a,b)
    if a>=b:
        a-=1
    else:
        b-=1
print(c)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
a, b = map(int, input().split())

if abs(a-b) <= 1:
  print(a+b)
else print(max(a, b)*2-1)

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

if abs(a-b) <= 1:
  print(a+b)
else:
  print(max(a, b)*2-1)


Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
a,b=map(int,input().split())
if a>=b:
  print(2*a+1)
else:
  print(2*b+1)

a,b=map(int,input().split())
if a==b:
  print(2*a)
elif a>b:
  print(2*a-1)
else:
  print(2*b-1)

Verdicts: Wrong Answer

Accepted