Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import numpy as np
a,b = map(int,input().split())

ans = int(a * b / np.gcd(a,b))

print(ans)



Fixed submission:

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

def gcd(a,b):
    if a%b==0:
        return b
    else:
        return gcd(b,a%b)
ans = a*b//gcd(a,b)
print(ans)

Buggy python submission (verdict: Runtime Error):

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

import numpy as np
ans = int(a * b / np.gcd(a, b))

print(ans)



Fixed submission:

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

def gcd(a,b):
    if a%b==0:
        return b
    else:
        return gcd(b,a%b)
ans = a*b//gcd(a,b)
print(ans)

Buggy python submission (verdict: Runtime Error):

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

import math
ans = int(a * b / math.gcd(a, b))

print(ans)





Fixed submission:

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

def gcd(a,b):
    if a%b==0:
        return b
    else:
        return gcd(b,a%b)
ans = a*b//gcd(a,b)
print(ans)
Buggy python submission (verdict: Runtime Error):
n,k = map(int,input().split())

h = [int(x) for x in input().split()]
cnt=0
for i in n:
    if h[i] < k:
        cnt+=1
print(cnt)


Fixed submission:

n,k = map(int,input().split())

h = [int(x) for x in input().split()]
cnt=0
for i in range(n):
    if h[i] >= k:
        cnt+=1
print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
s=[]
for i in range(n):
    s.append("".join(sorted(input())))

S=set(s)
"""
import math

def cmb(n,r):
    return math.factorial(n) // (math.factorial(n-r)*math.factorial(r))
"""
from operator import mul
from functools import reduce

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

ans=0
for x in S:
    a=s.count(x)
    if a<2:
        continue
    else:
        ans+=cmb(a,2)
print(ans)



Fixed submission:
n=int(input())
s=[]
for i in range(n):
    s.append("".join(sorted(input())))

S=set(s)

from operator import mul
from functools import reduce

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

from collections import Counter

ans=0
l=Counter(s)
for x in S:
    a=l[x]
    if a<2:
        continue
    else:
        ans+=cmb(a,2)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
s=[]
for i in range(n):
    s.append("".join(sorted(input())))

S=set(s)

import math

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


ans=0
for x in S:
    a=s.count(x)
    if a<2:
        continue
    else:
        ans+=cmb(a,2)
print(ans)


Fixed submission:
n=int(input())
s=[]
for i in range(n):
    s.append("".join(sorted(input())))

S=set(s)

from operator import mul
from functools import reduce

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

from collections import Counter

ans=0
l=Counter(s)
for x in S:
    a=l[x]
    if a<2:
        continue
    else:
        ans+=cmb(a,2)
print(ans)

Buggy python submission (verdict: Runtime Error):
n=int(input())
s=[]
for i in range(n):
    s.append("".join(sorted(input())))

S=set(s)

import math

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


ans=0
for x in S:
    a=s.count(x)
    ans+=cmb(a,2)
print(ans)


Fixed submission:
n=int(input())
s=[]
for i in range(n):
    s.append("".join(sorted(input())))

S=set(s)

from operator import mul
from functools import reduce

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

from collections import Counter

ans=0
l=Counter(s)
for x in S:
    a=l[x]
    if a<2:
        continue
    else:
        ans+=cmb(a,2)
print(ans)
Buggy python submission (verdict: Runtime Error):
import math
a,b,c,d=map(int,input().split())

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

i_max=b//c
j_max=b//d
k_max=b//lcm(c,d)

i_min=a//c
j_min=a//d
k_min=a//lcm(c,d)

i=i_max-i_min
j=j_max-j_min
k=k_max-k_min

print(b-a+1-(i+j-k))


Fixed submission:
from fractions import gcd
a,b,c,d=map(int,input().split())

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

e=lcm(c,d)

i_max=b//c
j_max=b//d
k_max=b//e

i_min=a//c
if a%c==0:
    i_min-=1
j_min=a//d
if a%d==0:
    j_min-=1
k_min=a//e
if a%e==0:
    k_min-=1

i=i_max-i_min
j=j_max-j_min
k=k_max-k_min

print(b-a+1-(i+j-k))
Buggy python submission (verdict: Runtime Error):
import math
n,k=map(int,input().split())

x=0
ans=0
for i in range(1,n+1):
    if k/i<=1:
        x=0
    else:
        x=int(math.log2(k/i))+1
    ans+=(1/n)*(1/2)**x
print(ans)
        


Fixed submission:
n,k=map(int,input().split())

x=0
ans=0

for i in range(1,n+1):
    score=i
    p=1/n
    while score<k:
        p*=0.5
        score*=2
    ans+=p
    

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n,q=map(int,input().split())
s=input()
lr=[]
for i in range(q):
    lr.append(list(map(int,input().split())))

for i in range(q):
    cnt=0
    S=s[lr[i][0]-1:lr[i][1]]
    for j in range(len(S)-1):
        if S[j]=="A" and S[j+1]=="C":
            cnt+=1
    print(cnt)


Fixed submission:
n,q=map(int,input().split())
s=input()

ac=[0]*n
for i in range(n-1):
    ac[i+1]=ac[i]
    if s[i]=="A" and s[i+1]=="C":
        ac[i+1]+=1


lr=[]
for i in range(q):
    lr.append(list(map(int,input().split())))

for i in range(q):
    print(ac[lr[i][1]-1]-ac[lr[i][0]-1])
Buggy python submission (verdict: Time Limit Exceeded):
s=list(input())
n1=len(s)

import sys
sys.setrecursionlimit(10**9)

def a(s,n1):
    for i in range(1,len(s)):
        if s[i-1]=="0" and s[i]=="1" or s[i-1]=="1" and s[i]=="0":
            s[i-1]=s[i]="a"
    s=list("".join(s).replace("a",""))
    
    if len(set(s))==1 or s==[]:
        print(n1-len(s))
    else:
        a(s,n1)
a(s,n1)    


Fixed submission:
a,b,c=map(int,input().split())

cnt=0

if b//a >c:
    print(c)
else:
    print(b//a)
Buggy python submission (verdict: Time Limit Exceeded):
s=list(input())
n1=len(s)

import sys
sys.setrecursionlimit(10**9)

def a(s,n1):
    for i in range(1,len(s)):
        if s[i-1]=="0" and s[i]=="1" or s[i-1]=="1" and s[i]=="0":
            s[i-1]=s[i]="a"
    s=list("".join(s).replace("a",""))
    
    if len(set(s))==1 or s==[]:
        print(n1-len(s))
    else:
        a(s,n1)
a(s,n1)    


Fixed submission:
s=list(input())
c0=0
c1=0
for i in range(len(s)):
    if s[i]=="0":c0+=1
    else: c1+=1
print(2*min(c0,c1))

Buggy python submission (verdict: Time Limit Exceeded):
s=list(input())
n1=len(s)

import sys
sys.setrecursionlimit(10**9)

def a(s,n1):
    for i in range(1,len(s)):
        if s[i-1]=="0" and s[i]=="1" or s[i-1]=="1" and s[i]=="0":
            s[i-1]=s[i]="a"
    s=list("".join(s).replace("a",""))
    
    if len(set(s))==1 or s==[]:
        print(n1-len(s))
    else:
        a(s,n1)
a(s,n1)    


Fixed submission:
s=list(input())
c0=0
c1=0
for i in range(len(s)):
    if s[i]=="0":c0+=1
    else: c1+=1
print(2*min(c0,c1))
Buggy python submission (verdict: Runtime Error):
h_state=[0]*n

def water(n,h,h_state):
    for i in range(n):
        if h_state[i]<h[i]:
            l=i
            break
        elif i==n-1 and h_state[i]<h[i]:
            l=i
        else:
            l=i+1
    
    for j in range(l,n):
        if h_state[j]==h[j]:
            r=j-1
            break
        else:
            r=j
    
    for k in range(l,r+1):
        h_state[k]+=1

cnt=0
while h_state != h:
    for i in range(n):
        if h_state[i]<h[i]:
            cnt+=1
            water(n,h,h_state)
            break
print(cnt)
        

Fixed submission:
n=int(input())
h=[int(x) for x in input().split()]

h_state=[0]*n

def water(n,h,h_state):
    for i in range(n):
        if h_state[i]<h[i]:
            l=i
            break
        elif i==n-1 and h_state[i]<h[i]:
            l=i
        else:
            l=i+1
    
    for j in range(l,n):
        if h_state[j]==h[j]:
            r=j-1
            break
        else:
            r=j
    
    for k in range(l,r+1):
        h_state[k]+=1

cnt=0
while h_state != h:
    for i in range(n):
        if h_state[i]<h[i]:
            cnt+=1
            water(n,h,h_state)
            break
print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
h=[]
for i in range(n):
    h.append(int(input()))
h.sort()

ans=max(h)-min(h)
for i in range(n-k+1):
    temp=h[i:i+k]
    ans=min(ans,max(temp)-min(temp))
print(ans)


Fixed submission:
n,k=map(int,input().split())
h=[]
for i in range(n):
    h.append(int(input()))
h.sort()

ans=h[-1]-h[0]
for i in range(n-k+1):
    ans=min(ans,h[i+k-1]-h[i])
print(ans)
Buggy python submission (verdict: Runtime Error):
d,n=map(int,input().split())

if d!=0:
    a=[100**d*i for i in range(1,100)]    
else:
    a=[i for i in range(1,100)]

print(a[n-1])


Fixed submission:
d,n=map(int,input().split())

if d==0:
    if n<100:
        print(n)
    else:
        print(101)
else:
    if n<100:
        print(100**d*n)
    else:
        print(100**d*101)

Buggy python submission (verdict: Runtime Error):
d,n=map(int,input().split())

if d!=0:
    a=[100*d*i for i in range(1,100)]    
else:
    a=[i for i in range(1,100)]

print(a[n-1])


Fixed submission:
d,n=map(int,input().split())

if d==0:
    if n<100:
        print(n)
    else:
        print(101)
else:
    if n<100:
        print(100**d*n)
    else:
        print(100**d*101)
Buggy python submission (verdict: Runtime Error):
X, Y = map(int, input().split())
ans = 'No'
for a in range(X + 1):
    b = X - a
    if 2 * a + 4 * b == Y:
    ans = 'Yes'
print(ans)

Fixed submission:
X, Y = map(int, input().split())
ans = 'No'
for a in range(X + 1):
    b = X - a
    if 2 * a + 4 * b == Y:
        ans = 'Yes'
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N=map(int,input())
A=[int(i) for i in input().split()]

a=1

for i in A:

    a=a*i

if a > 10**(18):
    print(-1)
else:
    print(a)

Fixed submission:
N=map(int,input())
A=[int(i) for i in input().split()]

a=1

if 0 in A:
    print(0)
    exit()

for i in A:

    a=a*i

    if a > 10**(18):
        print(-1)
        exit()


print(a)

Buggy python submission (verdict: Time Limit Exceeded):
N=map(int,input())
A=[int(i) for i in input().split()]

a=1

for i in A:

    a=a*i

if a > 10**(18):
    print(-1)
else:
    print(a)

Fixed submission:
N=map(int,input())
A=[int(i) for i in input().split()]

a=1

if 0 in A:
    print(0)
    exit()

for i in A:

    a=a*i

    if a > 10**(18):
        print(-1)
        exit()


print(a)
Buggy python submission (verdict: Runtime Error):
if S == "ARC":
    print("ABc")
else:
    print("ARC")

Fixed submission:
S =input()
if S == "ARC":
    print("ABC")
else:
    print("ARC")
Buggy python submission (verdict: Runtime Error):
N,K = input().split()
N = int(N)
K = int(K)

have = []
result = 0

for i in range(N):
    have.append([1]*K)


for i in range(K):
    d = int(input())
    A = input().split()
    A = map(int,A)

    for a in A:
        have[a-1][d-1] = 0

        
for j in have:
    if j == [1]*K:
        result += 1

print(result)

Fixed submission:
N,K = input().split()
N = int(N)
K = int(K)

have = []
result = 0

for i in range(N):
    have.append([1]*K)


for i in range(K):
    d = int(input())
    
    A = input().split()
    A = map(int,A)

    for a in A:
        have[a-1][i-1] = 0

        
for j in have:
    if j == [1]*K:
        result += 1

print(result)

Buggy python submission (verdict: Runtime Error):
N,K = input().split()
N = int(N)
K = int(K)

have = []
result = 0

for i in range(N):
    have.append([0]*K)


for i in range(K):
    d = int(input())
    A = input().split()
    A = map(int,A)

    for a in A:
        if have[a-1][d-1] == 0:
            have[a-1][d-1] = 1
        
for j in have:
    if j == [0]*K:
        result += 1

print(result)

Fixed submission:
N,K = input().split()
N = int(N)
K = int(K)

have = []
result = 0

for i in range(N):
    have.append([1]*K)


for i in range(K):
    d = int(input())
    
    A = input().split()
    A = map(int,A)

    for a in A:
        have[a-1][i-1] = 0

        
for j in have:
    if j == [1]*K:
        result += 1

print(result)

Buggy python submission (verdict: Runtime Error):
N,K = input().split()
N = int(N)
K = int(K)

have = []
result = 0

for i in range(N):
    have.append([0]*K)


for i in range(K):
    d = int(input())
    A = input().split()
    A = map(int,A)

    for a in A:
        have[a-1][d-1] = 1
        
for j in have:
    if j == [0]*K:
        result += 1

print(result)

Fixed submission:
N,K = input().split()
N = int(N)
K = int(K)

have = []
result = 0

for i in range(N):
    have.append([1]*K)


for i in range(K):
    d = int(input())
    
    A = input().split()
    A = map(int,A)

    for a in A:
        have[a-1][i-1] = 0

        
for j in have:
    if j == [1]*K:
        result += 1

print(result)

Buggy python submission (verdict: Runtime Error):
N,K = input().split()
N = int(N)
K = int(K)

have = []
result = 0

for i in range(N):
    have.append([0]*K)


for i in range(K):
    d = int(input())
    A = input().split()
    A = map(int,A)

    for a in A:
        have[a-1][d-1] = 1

for j in have:
    if j == [0,0]:
        result += 1

print(result)

Fixed submission:
N,K = input().split()
N = int(N)
K = int(K)

have = []
result = 0

for i in range(N):
    have.append([1]*K)


for i in range(K):
    d = int(input())
    
    A = input().split()
    A = map(int,A)

    for a in A:
        have[a-1][i-1] = 0

        
for j in have:
    if j == [1]*K:
        result += 1

print(result)
Buggy python submission (verdict: Time Limit Exceeded):
cell=list(map(int,input().split()))
n=cell[0]
k=cell[1]
pren=n
while 2>0:
    n=abs(n-k)
    if n >pren:
        break
    else:
        pren=n


print(pren)

Fixed submission:
import math
def main(cell):

    n=cell[0]
    k=cell[1]
    if k==0:
        return n
    else:

        risk=math.floor(n/k)
        if risk ==0:
            n=n
        else:
            n=abs(n-k*risk)
        pren=n
        while 2>0:
            n=abs(n-k)
            if n >pren:
                break
            else:
                pren=n

        return pren
    


cell=list(map(int,input().split()))
pren=main(cell)
print(pren)

Buggy python submission (verdict: Time Limit Exceeded):
cell=list(map(int,input().split()))
n=cell[0]
pren=n
while 2>0:
    n=abs(n-cell[1])
    if n >pren:
        break
    else:
        pren=n


print(pren)

Fixed submission:
import math
def main(cell):

    n=cell[0]
    k=cell[1]
    if k==0:
        return n
    else:

        risk=math.floor(n/k)
        if risk ==0:
            n=n
        else:
            n=abs(n-k*risk)
        pren=n
        while 2>0:
            n=abs(n-k)
            if n >pren:
                break
            else:
                pren=n

        return pren
    


cell=list(map(int,input().split()))
pren=main(cell)
print(pren)
Buggy python submission (verdict: Runtime Error):
sente=input()
n=len(sente)
nt=int((n-1)/2)
nb=int((n+3)/2)
#print(nt,nb)
#print(sente[nb:n])
if sente == sente[::-1]:
    if sente[0:nt] == sente[0:nt][::-1]:
        #print(sente[0:nt])
       
        if sente[nb-1:n]==sente[nb-1:n][::-1]:
            #print(sente[nb-1:n])

            print('Yes')
    else:
        print('No')
        else:
            print('No')
else:
    print('No')

Fixed submission:
sente=input()
n=len(sente)
nt=int((n-1)/2)
nb=int((n+3)/2)
#print(nt,nb)
#print(sente[nb:n])
if sente == sente[::-1]:
    if sente[0:nt] == sente[0:nt][::-1]:
        #print(sente[0:nt])
       
        if sente[nb-1:n]==sente[nb-1:n][::-1]:
            #print(sente[nb-1:n])

            print('Yes')
        else:
            print('No')
            
    else:
        print('No')
        
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
N,M = map(int, input().split())
H = list(map(int, input().split()))

x = list(range(N+1))

for i in range(N-1):
    a,b = map(int, input().split())
    if H[a-1] > H[b-1]:
        x[b] = 0
    elif H[a-1] < H[b-1]:
        x[a] = 0
    else:
        x[a] = 0
        x[b] = 0

x = set(x)
print(len(x)-1)


Fixed submission:
N,M = map(int, input().split())
H = list(map(int, input().split()))

A = [[] for i in range(N+1)]
for i in range(N+1):
    A[i].append(H[i-1])
for i in range(M):
    a,b = map(int, input().split())
    A[a].append(H[b-1])
    A[b].append(H[a-1])

ans = 0
for i in range(1,N+1):
    if max(A[i]) == A[i][0] and A[i].count(A[i][0]) < 2:
        ans += 1

print(ans)

Buggy python submission (verdict: Runtime Error):
N,M = map(int, input().split())
H = list(map(int, input().split()))

A = [[] for i in range(N+1)]
for i in range(N+1):
    A[i].append(H[i-1])
for i in range(M):
    a,b = map(int, input().split())
    A[a].append(H[b-1])
    A[b].append(H[a-1])

ans = 0

for i in range(1,N+1):
    x = sorted(set(A[i]))
    if x[-1] == H[i-1]:
        q = sorted(A[i])
        if q[-1] != q[-2]:
            ans += 1

    if len(A[i]) != 1 and len(x) == 1:
        ans -= 1
print(ans)


Fixed submission:
N,M = map(int, input().split())
H = list(map(int, input().split()))

A = [[] for i in range(N+1)]
for i in range(N+1):
    A[i].append(H[i-1])
for i in range(M):
    a,b = map(int, input().split())
    A[a].append(H[b-1])
    A[b].append(H[a-1])

ans = 0
for i in range(1,N+1):
    if max(A[i]) == A[i][0] and A[i].count(A[i][0]) < 2:
        ans += 1

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = input()

cnt = 0
for i in range(N):
    for j in range(N):
        k = i*2 - j
        if j < k < N and S[i] != S[j] and S[j] !=S[k] and S[i] != S[k]:
            cnt += 1

print(S.count("R")*S.count("G")*S.count("B")-cnt)

Fixed submission:
N = int(input())
S = input()

cnt = 0
for i in range(N):
    for j in range(N):
        k = i*2 - j
        if j < k < N and S[i] != S[j] and S[j] !=S[k] and S[i] != S[k]:
            cnt += 1

print(S.count("R")*S.count("G")*S.count("B")-cnt)
Buggy python submission (verdict: Runtime Error):
H, W = map(int, input().split())

if H == 1 or W == 1:
    print(1)
    quit()

ans = (math.ceil(W / 2) * math.ceil(H / 2)) + ((W // 2) * (H // 2))

print(ans)

Fixed submission:
import math
H, W = map(int, input().split())

if H == 1 or W == 1:
    print(1)
    quit()

ans = (math.ceil(W / 2) * math.ceil(H / 2)) + ((W // 2) * (H // 2))

print(ans)
Buggy python submission (verdict: Runtime Error):
H,A = map(int, input().split())
print(math.ceil(H/A))


Fixed submission:
import math
H,A = map(int, input().split())
print(math.ceil(H/A))
Buggy python submission (verdict: Runtime Error):
import math
A, B, C, D = map(int, input().split())


def lcm(x, y):
    return (x * y) // math.gcd(x, y)


A = A - 1

ans = B - (B // C) - (B // D) + (B // (lcm(C, D)))
p = (A - (A // C) - (A // D) + (A // (lcm(C, D))))

print(ans - p)


Fixed submission:
import fractions
A, B, C, D = map(int, input().split())


def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)


A = A - 1

ans = B - (B // C) - (B // D) + (B // (lcm(C, D)))
p = (A - (A // C) - (A // D) + (A // (lcm(C, D))))

print(ans - p)
Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int, input().split())
h = list(map(int, input().split()))

dp = [0] + [1000000000000]*(N-1)

for i in range(1,N):
    for j in range(max(i-K,0),i):
        dp[i] = min(dp[i],dp[j]+abs(h[i]-h[j]))

print(dp[-1])


Fixed submission:
N,K = map(int, input().split())
h = list(map(int, input().split()))

dp = [0] + [1000000000000]*(N-1)

for i in range(1,N):
    for j in range(max(i-K,0),i):
        dp[i] = min(dp[i],dp[j]+abs(h[i]-h[j]))

print(dp[-1])
Buggy python submission (verdict: Runtime Error):
import numpy as np
N, W = map(int, input().split())

dp = np.zeros(W + 1, int)

for i in range(N):
    w, v = map(int, input().split())
    np.maximum(dp[:-w] + v, dp[w:], out=dp[w:])

print(dp[-1])


Fixed submission:
import numpy as np
N, W = map(int, input().split())

dp = np.full(N * 1001, W + 10000)
dp[0] = 0

for i in range(N):
    w, v = map(int, input().split())
    dp[v:] = np.minimum(dp[:-v] + w, dp[v:])

ans = np.max(np.where(dp <= W))
print(ans)
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
print("YES" if b - a=c - b else "NO")

Fixed submission:
a, b, c = map(int, input().split())
print("YES" if b - a == c - b else "NO")
Buggy python submission (verdict: Runtime Error):
n = int(input())
v = map(int,input().split())
c = map(int,input().split())
cnt = 0
for i in range(n):
    if v[i] > c[i]:
        cnt += (v[i] - c[i])
    else:
        cnt += 0    
print(cnt)

Fixed submission:
a,b,t = map(int,input().split())
n = t // a
print(n*b)
Buggy python submission (verdict: Runtime Error):
A,B = map(int,input().split())
if A > B:
    print(int(A) + int(A) - 1)
elif B > A:
    print(int(B) + int(B) - 1)
else A = B:
    print(int(A) + int(A))

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

Buggy python submission (verdict: Runtime Error):
A,B = map(int,input().split())
if A > B:
    print(A*2 - 1)
elif B > A:
    print(B*2 - 1)
else A = B:
    print(A*2)

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

Buggy python submission (verdict: Runtime Error):
A,B = map(int,input().split())
if A > B:
    print(A*2 - 1)
elif B > A:
    print(B*2 - 1)
else A == B:
    print(A*2)

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

Buggy python submission (verdict: Runtime Error):
A,B = map(int,input().split())
if A > B:
    print(A*2 - 1)
elif B > A:
    print(B*2 - 1)
else A == B:
    print(A*2)

Fixed submission:
A, B = map(int,input().split())
if A > B:
    print(int(A) + int(A) - 1)
elif B > A:
    print(int(B) + int(B) - 1)
else:
    print(int(A) + int(A))
Buggy python submission (verdict: Runtime Error):
f = abs(e - a)
if k >= f:
    print('Yay!')
else:
    print(':(')


Fixed submission:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
#a < b < c < d < e

f = abs(e - a)
if k >= f:
    print('Yay!')
else:
    print(':(')

Buggy python submission (verdict: Runtime Error):
a = input()
b = input()
c = input()
d = input()
e = input()
k = input()
a < b < c < d < e

f = abs(e - a)
if k >= f:
    print('Yay!')
else:
    print(':(')

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
#a < b < c < d < e

f = abs(e - a)
if k >= f:
    print('Yay!')
else:
    print(':(')
Buggy python submission (verdict: Runtime Error):
b = input()
if b == A:
    print(T)
elif b == C:
    print(G)
elif b == G:
    print(C)
else:
    print(A)

   

Fixed submission:
b = input('')
if b == 'A':
    print('T')
elif b == 'C':
    print('G')
elif b == 'G':
    print('C')
else:
    print('A')

Buggy python submission (verdict: Runtime Error):
b = input('')
if b = 'A':
    print('T')
elif b = 'C':
    print('G')
elif b = 'G':
    print('C')
else:
    print('A')


Fixed submission:
b = input('')
if b == 'A':
    print('T')
elif b == 'C':
    print('G')
elif b == 'G':
    print('C')
else:
    print('A')

Buggy python submission (verdict: Runtime Error):
b = input()
if b = A:
    print(T)
elif b = C:
    print(G)
elif b = G:
    print(C)
else:
    print(A)            


Fixed submission:
b = input('')
if b == 'A':
    print('T')
elif b == 'C':
    print('G')
elif b == 'G':
    print('C')
else:
    print('A')
Buggy python submission (verdict: Runtime Error):
s = input()
if s[6] >= 5:
    print('TBD')
else:
    print('Heisei')

Fixed submission:
a,b,c = map(int,input().split('/'))
if a > 2019 or a == 2019 and b >= 5:
    print('TBD')
else:
    print('Heisei')
Buggy python submission (verdict: Runtime Error):
a,b,c =map(int.input().split())
print(a * b // 2)

Fixed submission:
a,b,c = map(int,input().split())
print(a * b // 2)