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):
import itertools
num = list(map(int, input().split()))
num_2 = list(itertools.combinations_with_replacement(num, 2))
result = 0
tmp_1 = 0
tmp_2  =0
for i in range(len(num_2)):
    if num_2[i][0] == num_2[i][1]:
        tmp  = num_2[i][0] +  num_2[i][0] - 1
        tmp_1 =  num_2[i][0] +  num_2[i][0]
        tmp_2 = num_2[i][1] +  num_2[i][1]
    if result < tmp:
        result = max(tmp,tmp_1,tmp_2)
print(result)

import itertools
num = list(map(int, input().split()))
result = 0
tmp_1 = 0
tmp  =0
tmp_2 = 0
if num[0] == num[1]:
    tmp  = num[0] +  num[0] - 1
else:
    tmp = num[0] + num[1]
    tmp_1 = num[0] + num[0]
    tmp_2 = num[1] + num[1]
print(max(tmp,tmp_1,tmp_2))

A,B= map(int, input().split())
if A == B:
    B = B + 1
print(A + B)

N = int(input())
num = list(map(int, input().split()))
tmp = 0
state_tmp = 0
result = 1

for i in range(N):
    if i != 0 and 1<= num[i] <= 200:
        for j in range(N):
            if num[j] <= num[i]:
                state_tmp +=1
        if state_tmp ==  N and tmp <= num[i]:
                result +=1
        tmp = num[i]
        state_tmp = 0
    else:
        tmp = num[i]
    
print(result)

import itertools
num = list(map(int, input().split()))
num_2 = list(itertools.combinations_with_replacement(num, 2))
result = 0
tmp_1 = 0
for i in range(len(num_2)):
    if num_2[i][0] == num_2[i][1]:
        tmp  = num_2[i][0] +  num_2[i][0] - 1
        tmp_1 =  num_2[i][0] +  num_2[i][0]
    if result < tmp:
        result = max(tmp,tmp_1)
print(result)

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

import itertools
num = list(map(int, input().split()))
result = 0
tmp_1 = 0
tmp  =0
tmp_2 = 0
if num[0] == num[1]:
    tmp  = num[0] +  num[0]
else:
    tmp = num[0] + num[1]
    tmp_1 = num[0] + num[0] -1
    tmp_2 = num[1] + num[1] -1
print(max(tmp,tmp_1,tmp_2))

Verdicts: Wrong Answer

Wrong Answer

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

n, k = map(int, input().split())
s = [int(x) for x in list(input())]

state = 1
cnt = 0
l = []
for i in s:
    if i == state:
        cnt += 1
    else:
        l.append(cnt)
        cnt = 1
        state = i
l = [x for x in l if x >0]
if len(l) % 2 == 1:
    l.append(0)

Add = 2 * k + 1
ruiseki = [0]

for i, e in enumerate(l):
    ruiseki.append(ruiseki[i] + l[i])

answer = 0
for i in range(0, len(l), 2):
    left = i
    right = min(i + Add, len(l))
    tmp = ruiseki[right] - ruiseki[left]
    answer = max(tmp, answer)
 
print(answer)

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

from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,datetime,random
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())

A,B =inpl()
if A==B:
    print(A+B)
else:
    print(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())
C=[A+A-1, B+B-1, A+B]
print(max(c))

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

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):
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
N = int(input())
Hlist = [int(x) for x in input().split()]

count = 0
for i in range (N):
    if Hlist[i] >= max(Hlist[0:i+1]):
        count+= 1

print(count)


#! /usr/bin/env python3
# -*- coding: utf-8 -*-
A, B = [int(x) for x in input().split()]
if A>B:
  ans = A + A-1
elif B>A:
  ans = B+B-1
else:
  ans = 2*A

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):
hpi = input()
count = 1
k = list(map(int, input().split(" ")))
for c in range(int(hpi) - 1):
  jo = "yes"
  n = k[:c + 2]
  for co in range(len(n) - 1):
    if n[co] > k[c + 1]:
      jo = "no"
    else:
      pass
  if jo == "yes":
    count += 1
print(count)


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

hpi = input()
k = list(map(int, input().split(" ")))
for c in range(int(hpi) - 1):
  jo = "yes"
  n = k[:c + 2]
  for co in range(len(n) - 1):
    if n[co] > k[c + 1]:
      jo = "no"
    else:
      pass
  if jo == "yes":
    count += 1
print(count + 1)


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

Verdicts: Runtime Error

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):
print("hello")

a,b = map(int,input().split())
if a>b:
  print(a+max(a-1,b))
else:
  print(b+max(a,b-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())
if a==b:
  print(a+b)
elif a<b:
  print(b*2)
else:
  print(a*2)

a,b=map(int,input().split())
if a==b:
  print(a+b)
elif a<b:
  print(b*2-1)
else:
  print(a*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(a+b)

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

print(max(a+b, a*2-1,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())
if a != b:
    ans = max(a,b) + max(a,b) - 1
else:
    ans = a*2:
print(ans)


a,b = map(int,input())
if a != b:
    ans = max(a,b) + max(a,b) - 1
else:
    ans = a*2:
print(ans)


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


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,inpput().split())
print(max(a+b,max(a,b)+max(a-1,b-1)))


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

a,b=map(int,inpput().split())
print(max(a+b,2*max(a,b)))


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


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


Verdicts: Runtime Error

Runtime Error

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

n = 2
total = 0
while n > 0:
  if a > b:
    total=total+a
  else:
    total=total+b
  n-=1
print(total)

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

n = 2
total = 0
while n > 0:
  if a > b:
    total=total+a
    a-=1
  else:
    total=total+b
    b-=1
  n-=1
print(total)

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

def main1(A, B):
    res = 0
    if B + 1 < A:
        res = (A * 2) - 1
    elif A == B :
        res = A + B
    else:
        res = (B * 2) - 1
    print(res)

main(A, B)


def main1(A, B):
    res = 0
    if A == B:
        res = A * 2
    else:
        res = (max(A,B) * 2) - 1
    print(res)

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

#main1(5,3)#9
#main1(3,4)#7
#main1(6,6)#12


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

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

n = int(input())
l = map(int, input().split())
hst = 0
cnt = 0
for i in l:
  if hst <= i:
    cnt += 1
    hst = i
print(cnt) 

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

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):
def calc(x):
    global mount
    global list
    count=0
    for y in range(1,x+1):
        if mount[x] >= mount[x-y]:
            count+=1
    if x == count:
        list.append(x)

N=int(input())

mount=input().split()

list=[]

for z in range(1,len(mount)):
    calc(z)

print(1+len(list))

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

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

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):
b, c = map(int, input().split())
total = 0;
if(b > c):
  total = b
  b -= 1
else:
  total = c
  c -= 1

if(b > c):
  total = b
  b -= 1
else:
  total = c
  c -= 1

print(total)

b, c = map(int, input().split())
total = 0;
if(b > c):
    total = b
    b -= 1
else:
    total = c
    c -= 1

if(b > c):
    total += b
    b -= 1
else:
    total += c
    c -= 1

print(total)

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):
def button(x,y):
  return max(2*x-1, 2*y-1, x+y)



def button(x,y):
  return max(2*x-1, 2*y-1, x+y)

inputs = input()
x,y  = list(map(lambda x:int(x),inputs.split()))
print(button(x,y))


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=input().sprit()
ans=0
if a[1]-1a[0]>=1:
  ans+=a[1]*2-1
elif a[0]-a[1]>=1:
  ans+=a[0]*2-1
else:
  ans+=a[0]+a[1]
print(ans)
  

b=input().split(" ")
a=[]
for i in b:
  a+=[int(i)]
ans=0
if a[1]-a[0]>=1:
  ans+=a[1]*2-1
elif a[0]-a[1]>=1:
  ans+=a[0]*2-1
else:
  ans+=a[0]+a[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):
a,b=map(int,input().split())
if a>b:
    m+=a
    a=a-1
m+=max(a,b)
print(m)

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


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 abs(a-b)<=1:
  print(a+b)
else:
  if a>b:
    print(a*2-1)
  else:
    print(b*2-1)
    

a,b = map(int,input().split())
if abs(a-b)<=1:
  print(a+b)
else:
  if a>b:
    print((a*2)-1)
  else:
    print((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 = input().split()
b = 0
for i in range(2):
    a.sort(reverse=True)
    b = b + int(a[1])
    a[1] = str(int(a[1]) - 1)
print(b)

a,b = map(int,input().split())
c = 0
for i in range(2):
    if a > b:
        c += a
        a -= 1
    elif a < b:
        c += b
        b -= 1
    else:
        c += 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=int(input()
print(max(a+b,a+a-1,b+b-1))

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

  A = 5
  B = 3
  total = 0
  if A < B:
    total += B
    if A < B - 1:
      total += B - 1
    else:
      total += A
  elif B < A:
    total += A
    if B < A - 1:
      total += A - 1 
    else:
      total += B
  else:
    total = A + B 
  print(total)

  A = 5
  B = 3
  total = 0
  if A < B:
    total += B
    if A < B - 1:
      total += B - 1
    else:
      total += A
  elif:
    total += A
    if B < A - 1:
      total += A - 1 
    else:
      total += B
  else:
    total = A + B 
  return total

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

n = int(input())
nums = list(map(int, input().split()))
count = 0

for i in range(len(nums)):
    flag = True
    for j in range(i):
        if nums[j] > nums[i]:
            flag=  False
    if flag:
        count += 1
print(count)


def coin(A , B):
  total = 0
  if A < B:
    total += B
    if A < B - 1:
      total += B - 1
    else:
      total += A
  else:
    total += A
    if B < A - 1:
      total += A - 1 
    else:
      total += B

  total = 0
  if A < B:
    total += B
    if A < B - 1:
      total += B - 1
    else:
      total += A
  elif:
    total += A
    if B < A - 1:
      total += A - 1 
    else:
      total += B
  else:
    total = A + B
    

  A = 5
  B = 3
  total = 0
  if A < B:
    total += B
    if A < B - 1:
      total += B - 1
    else:
      total += A
  elif B < A:
    total += A
    if B < A - 1:
      total += A - 1 
    else:
      total += B
  else:
    total = A + B 
  return total

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

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):
a,b=map(int,input().split())
if a<b:
    print(2*a-1)
elif a==b:
    print(2*a)
else:
    print(2*b-1)

a,b=map(int,input().split())
if a<b:
    print(2*b-1)
elif a==b:
    print(2*a)
else:
    print(2*a-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(max(2*a,a+b,2*b-1))

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

a,b=map(int,input().split())
print(max(2*a-1, a+b, 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 = map(int,input().split())
if A == B:
  print(2A)
else:
  print(2*max(A,B))
  

A,B = map(int,input().split())
if A == B:
  print(2*A)
else:
  print(2*max(A,B))

A,B = map(int,input().split())
if A == B:
  print(2A)
else:
  print(2*max(A,B))

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

Verdicts: Runtime Error

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

A = sorted(A)
ans = 0
ans += A[0]
A[0] -= 1
A = sorted(A)
ans += A[0]
print(ans)

A = list(map(int, input().split()))
A.sort()
ans = 0
ans += A[1]
A[1] -= 1
A.sort()
ans += A[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):
n=input()
h = list(map(int,input().split()))
h1 = h[0]
hi = h[-1]
hi2 = h[-2]
count = 0
for takasa in h:
    if takasa >= h1:
        count+= 1
if hi2 > hi and hi2 >= h1:
    count -= 1
print(count)

n=input()
h = list(map(int,input().split()))
h1 = h[0]
hi = h[-1]
hi2 = h[-2]
count = 0
for takasa in h:
    if takasa >= h1:
        count+= 1
if hi2 > hi and hi2 >= h1:
    count -= 1
print(count)

n=input()
h = list(map(int,input().split()))
h1 = h[0]
hi = h[-1]
hi2 = h[-2]
count = 0
ans = [count + 1 for t in h if t >= h1]
if hi2 > hi and hi2 >= h1:
    ans -= 1
print(count)

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

Verdicts: Runtime Error

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

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

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

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

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

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

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

c=0

for i in range(2):
	if a > b:
		c+=a
		a-=1
	else:
		c+=b
		b-=1

print(c)

a=int(input())
b=int(input())

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

a,b = map(int,input().split())
c=0
for i in range(2):
	if a > b:
		c+=a
		a-=1
	else:
		c+=b
		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 = [ int(v) for v in input().split() ]
print(max(a+b,a*2+1,b*2+1))

n = int(input())
num_list = [ int(v) for v in input().split() ]
s = 0
for i in range(n):
	if max(num_list[:i+1]) <= num_list[i]:
		s += 1
print(s)

a, b = [ int(v) for v in input().split() ]
print(max(a*b,a*(a-1),b*(b-1)))

a, b = [ int(v) for v in input().split() ]
print(max(a+b,a*2-1,b*2-1))

Verdicts: Wrong Answer

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

res = 0

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

print(res)

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

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):
tmp=input().sprit(" ")
a = int(tmp[0])
b = int(tmp[1])

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


tmp=input().sprit(" ")
a = int(tmp[0])
b = int(tmp[1])

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


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

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

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

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

a,b=map(int,input().split())
print(max(2*a-1,a+b,2*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,t = map(int, input().split())
ans=0
for i in range(1,t):
    if i%a ==0:
        ans = ans + b

print(ans)

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

ans = 0

if b - a > 1:
    ans = b + (b-1)
elif b-a == 1:
    ans = a + b
elif b - a == 0:
    ans = a + b
else:
    ans = a + a- 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 = int(input())
arr = list(map(int,input().split()))
num = 0
tmp = 0

for data in arr:
	if data >= tmp:
		num += 1
		tmp = data

print(num)


A, B = input().split()
A = int(A)
B = int(B)
AA = A * 2 - 1
AB = A + B
BB = B * 2 - 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):
total=0
A,B = map(int,input().split(" "))
if A>=B:
    tmp=B
    B=A
    A=tmp
total+=B
B=B-1
if A>=B:
    tmp=B
    B=A
    A=tmp
total+=B
print(B)    

total=0
A,B = map(int,input().split(" "))
if A>=B:
    tmp=B
    B=A
    A=tmp
total+=B
if A>=B:
    tmp=B
    B=A
    A=tmp
total+=B
print(total)

total=0
A,B = map(int,input().split(" "))
if A>=B:
    tmp=B
    B=A
    A=tmp
total+=B
B=B-1
if A>=B:
    tmp=B
    B=A
    A=tmp
total+=B
print(total)

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


print(max(a+a-1,b+b-1,a+br))


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


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

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

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

a=int(input())
b=int(input())

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

a=int(input())
b=int(input())

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

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())
ma = max(2*a-1, a+b, 2*b-1)
print(ma)

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


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())
l=list(map(int,input().split()))
s=1
for i in range(1,n):
  if l[i]>=max(l[0:i]):
    s=s+1
print(s)

a,b = input().split()
M,m=max(int(a),int(b)),min(int(a),int(b))
if M==m:
  print(2*M)
else:
  print(2*M-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):
#!/usr/bin/env python
a = input()
a = [int(i) for i in a.split()]
ret = 0
ret += max(a)
if a[0] <= a[1]:
    a[0] -= 1
else:
    a[1] -= 1
ret += max(a)
print(ret)


#!/usr/bin/env python
a = input()
a = [int(i) for i in a.split()]
ret = 0
ret += max(a)
if a[0] >= a[1]:
    a[0] -= 1
else:
    a[1] -= 1
ret += max(a)
print(ret)


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))
result = 0
for _ range(2):
  if a >= b:
    result += a
    a -= 1
  else:"
    result += b
    b -= 1
print(result)

a, b = list(map(int, input().split()))
result = 0
for _ in range(2):
  if a >= b:
    result += a
    a -= 1
  else:
    result += b
    b -= 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):
N=int(input())
H=[int(x) for x in input().split()]
cnt=1
tall=H[0]
for i in range(1,N):
    if tall<=H[i]:
        tall=H[i]
        cnt+=1
print(cnt)


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


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=max(a,b)
print(c+max(c-1,a,b))

a,b = map(int,input().split())
c=max(a,b)
print(c+max(c-1,min(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 = int(input())
H = list(map(int,input().split()))
maxi = 0
cnt = 0
for i in range( N ) :
    if H[i] >= maxi :
        cnt += 1
        maxi = H[i]
print( cnt )
    


A,B = list(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 - 1 )
if A == B :
    print( A + B )
else :
    print( 2*B - 1 )


S = input()
S1 = ''
S2 = ''
if i in range(len(S)):
    if i % 2 ==0 :
        S1 += '0'
        S2 += '1'
    else :
        S1 += '1'
        S2 += '0'
min1 = 0
for i in range(len(S)):
    if S[i] != S1[i]:
        min1 += 1
min2 = 0
for i in range(len(S)):
    if S[i] != S1[i]:
        min2 += 1 
print(min(min1,min2))


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


Verdicts: Runtime Error

Runtime Error

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):
import math
tile=int(input())
if len(str(tile))==1:
    print(0)
    exit()
if len(str(tile))%2==1:
    tile1=int("01"*int(math.ceil(len(str(tile))/2)),2)
    tile2=int("10"*int(math.ceil(len(str(tile))/2)),2)
else:
    tile1=int("01"*int(len(str(tile))/2),2)
    tile2=int("10"*int(len(str(tile))/2),2)

tile_10=int(str(tile),2)
convert1=format(tile_10^tile1,'b').zfill(len(str(tile)))
convert2=format(tile_10^tile2,'b').zfill(len(str(tile)))
if convert1.count("1")<=convert2.count("1"):
    print(convert1.count("1"))
else:
    print(convert2.count("1"))


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


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())
print(max(a,b)+max(min(a,b),max(a,b)-1)

a =list(map(int, input().split())) 
print(max(a)+max([min(a),max(a)-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.())
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):
a,b = (int(i) for i in input().split()) 
if a == b:
  print(a + b):
else:
  s = max(a, b)
  print(s + s -1)

a,b = (int(i) for i in input().split()) 
if a == b:
  print(a + b)
else:
  s = max(a, b)
  print(s + s -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):
bt = input()
bt_A, bt_B = bt.split()
bt_max, bt_min = max(bt_A, bt_B), min(bt_A, bt_B)
max_num = bt_max + max(bt_max - 1, bt_min)
print(max_num)

bt = input()
bt_A, bt_B = bt.split()
bt_max, bt_min = max(int(bt_A), int(bt_B)), min(int(bt_A), int(bt_B))
max_num = bt_max + max(bt_max - 1, bt_min)
print(max_num)

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


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


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 = int(input())
b = int(input())
count = 0

if a > b:
  count = a
  a = a - 1
  if a > b or a == b:
    count = count + a
elif b > a:
  count = b
  b = b - 1
  if b > a or a == b:
    count = count + b
else:
  count = a
  count = count + b

print(count)

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

if a > b:
  count = a * 2 -1;
elif b > a:
  count = b * 2 -1;
else:
  count = a + b
print(count)

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

import sys
import numpy as np

a = int(sys.argv[1])
b = int(sys.argv[2])

max_number = np.array([a+b,2*a-1,2*b-1]).max()
print(max_number)


import numpy as np
a,b= map(int,input().split())
max_number = np.array([a+b,2*a-1,2*b-1]).max()
print(max_number)

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())
coins = [a+b,2a-1,2b-1]
print(max(coins))

a,b=map(int,input().split())
coins = [a+b,2*a-1,2*b-1]
print(max(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):
n, k = map(int, input().split())
s = input().rstrip()

def findEx(s, f, pos, notfound):
  pos = s.find(f, pos)
  if pos == -1:
    pos = notfound
  return pos
    
ans = 0
left = 0
right = 0
while right < n:
    if k > 0:
        right = findEx(s, '01', right, n-1) + 1
        k = k - 1
        right = findEx(s, '10', right, n-1) + 1
        ans = max(ans, right - left)
    else:
        left = findEx(s, '01', left, n-1) + 1
        k = k + 1

print(ans)

n, k = map(int, input().split())
k += 1
s = "01" + input().rstrip()
ans = 0
i = 0
left = 2
right = 1
while i < n:
    if k > 0:
        pos = s.find('01', i)
        if pos == -1:
            i = n
            right = n - 1
        else:
            pos = s.find('10', pos + 1)
            if pos == -1:
                i = n
                right = n - 1
            else:
                right = pos
                i = pos + 1
        k = k - 1
        ans = max(ans, right - left + 1)
    else:
        pos = s.find('01', left)
        left = pos + 1
        k = k + 1

print(ans)

n, k = map(int, input().split())
s = input().rstrip()
ans = 1
left = 0
right = -1
pos = s.find('10', 0)
if pos == -1:
  i = n
else:
  i = pos + 1

while i < n:
    if k > 0:
        pos = s.find('01', i)
        if pos == -1:
            i = n
            right = n - 1
        else:
            pos = s.find('10', pos + 1)
            if pos == -1:
                i = n
                right = n - 1
            else:
                right = pos
                i = pos + 1
        k = k - 1
        ans = max(ans, right - left + 1)
    else:
        pos = s.find('01', left)
        left = pos + 1
        k = k + 1

print(ans)


class BufInput:
  def __init__(self):
    self.save = False
    self.buf = None
  def read(self, save=False):
    if self.save:
      ret = self.buf
    else:
      try:
        ret = input()
      except EOFError as e:
      	ret = None
    self.save = save
    self.buf = ret
    return ret
    
  
bi = BufInput()
while bi.read(True):
  n, k = map(int, bi.read().split())
  s = bi.read().rstrip()

  def findEx(s, f, pos, notfound):
    pos = s.find(f, pos)
    if pos == -1:
      pos = notfound
    return pos

  ans = 0
  left = 0
  right = 0
  while right < n:
      if k > 0:
          right = findEx(s, '01', right, n-1) + 1
          k = k - 1
          right = findEx(s, '10', right, n-1) + 1
          ans = max(ans, right - left)
      else:
          left = findEx(s, '01', left, n-1) + 1
          k = k + 1

  print(ans)


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

AB = []
AB += [A, B]

def push(AB):
  if AB[0] >= AB[1]:
    i = 0
  else:
    i = 1
  ret = AB[i]
  AB[i] -= 1
  return ret

s = 0
for _ in range(2):
	s += push(AB)

print(s)


Verdicts: Runtime Error

Runtime Error

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())
r =0
if A > B:
  r+=A  A-=1
else:
  r += B
  B-=1

r+=max(A,B)
print(r)

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

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):
s = input().split()
 
if int(s[0]) < int(s[1]):
  s1 = int(s[0])
  s2 = int(s[1])
else:
  s1 = int(s[1])
  s2 = int(s[0])
  
result = 0
if (s2-s1) > 2:
  result = s2*2 - 1
else:
  result = s2 + s1
 
print(result)

s = input().split()

if s[0] < s[1]:
  s1 = s[0]
  s2 = s[1]
else:
  s1 = s[1]
  s2 = s[0]
  
result = 0
if (s2-s1) > 2:
  result = s2*2 - 1
else (s2-s1) = 1:
  result = s2 + s1

print(result)

s = input().split()
 
if int(s[0]) < int(s[1]):
  s1 = int(s[0])
  s2 = int(s[1])
else:
  s1 = int(s[1])
  s2 = int(s[0])
  
result = 0
if (s2-s1) >= 2:
  result = s2*2 - 1
else:
  result = s2 + s1
 
print(result)


Verdicts: Wrong Answer

Runtime Error

Accepted