Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
n = int(input())
lst = [int(i) for i in input().split()]

flag = 0

if len(lst) == 1:
    flag = 1

for i in range(0,len(lst)-1):
    if lst[i]-1 == lst[i+1]:
        lst[i] = lst[i] - 1



if flag == 0:
    for i in range(0,len(lst)-1):
        if (lst[i] <= lst[i+1])&(flag==0):
            #print(str(lst[i])+'<='+str(lst[i+1]))
            flag = 0
        else:
            flag = 1



if flag == 0:
    print('Yes')
else:
    print('No')

Fixed submission:
a, b, c = map(int, input().split())
x = a - b
ans = c - x
if ans <= 0:
    print(0)
else:
    print(ans)

Buggy python submission (verdict: Runtime Error):
tmp = int(input())
#tmp = 100000

input_num = tmp

lst = []
while tmp > 0:
    lst.append(tmp % 10)  # 余りが入るから右の桁から処理される。　例 345/10 % = 5
    tmp //= 10  # 必須
lst.reverse()

# print(lst)

# print(input_num)

ketasuu = len(lst)
ans = 0
flag = 0
tmp = 0

kazoeru = ketasuu - 1

# 桁数が偶数のとき
if ketasuu % 2 == 0:
    for keta_num in reversed(range(kazoeru)):

        if flag == 0:
            tmp = (10 ** keta_num) * 9
            ans = ans + tmp
            # print("{} {}".format(ans,tmp))
            flag = 1
        else:
            flag = 0

elif ketasuu == 1:
    ans = input_num

# 桁数が奇数のとき
else:
    # print((10**ketasuu) * lst[0])
    ans = input_num - ((10 ** kazoeru) * lst[0])
    ans = ans + 1

    for keta_num in reversed(range(kazoeru - 1)):

        if flag == 0:
            tmp = (10 ** keta_num) * 9
            ans = ans + tmp
            # print("{} {}".format(ans,tmp))
            flag = 1
        else:
            flag = 0

print(ans)

Fixed submission:
a, b, c = map(int, input().split())
x = a - b
ans = c - x
if ans <= 0:
    print(0)
else:
    print(ans)

Buggy python submission (verdict: Runtime Error):
tmp = int(input())
#tmp = 100000

input_num = tmp

lst = []
while tmp > 0:
    lst.append(tmp % 10)  # 余りが入るから右の桁から処理される。　例 345/10 % = 5
    tmp //= 10  # 必須
lst.reverse()

# print(lst)

# print(input_num)

ketasuu = len(lst)
ans = 0
flag = 0
tmp = 0

kazoeru = ketasuu - 1

# 桁数が偶数のとき
if ketasuu % 2 == 0:
    for keta_num in reversed(range(kazoeru)):

        if flag == 0:
            tmp = (10 ** keta_num) * 9
            ans = ans + tmp
            # print("{} {}".format(ans,tmp))
            flag = 1
        else:
            flag = 0

elif ketasuu == 1:
    ans = input_num

# 桁数が奇数のとき
else:
    # print((10**ketasuu) * lst[0])
    ans = input_num - ((10 ** kazoeru) * lst[0])
    ans = ans + 1

    for keta_num in reversed(range(kazoeru - 1)):

        if flag == 0:
            tmp = (10 ** keta_num) * 9
            ans = ans + tmp
            # print("{} {}".format(ans,tmp))
            flag = 1
        else:
            flag = 0

print(ans)

Fixed submission:
a, b, c = map(int, input().split())
x = a - b
ans = c - x
if ans <= 0:
    print(0)
else:
    print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
lst = [int(i) for i in input().split()]

flag = 0

for i in range(0,len(lst)-1):
    if lst[i]-1 == lst[i+1]:
        lst[i] = lst[i] - 1
        print(lst)


if flag == 0:
    for i in range(0,len(lst)-1):
        if (lst[i] <= lst[i+1])&(flag==0):
            print(str(lst[i])+'<='+str(lst[i+1]))
            flag = 0
        else:
            flag = 1


print(lst)
if flag == 0:
    print('Yes')
else:
    print('No')

Fixed submission:
n = int(input())
lst = [int(i) for i in input().split()]

lst[0] -=1
for i in range(1,len(lst)):
    if (lst[i-1] != lst[i]) or (lst[i-1] > lst[i]):
        lst[i] -= 1

flag = 0
for i in range(len(lst)-1):
    if (lst[i] <= lst[i + 1]) & (flag==0):
        flag = 0
    else:
        flag = 1

if len(lst) == 1:
    flag = 1


if flag == 0:
    print('Yes')
else:
    if len(lst) == 1:
        print('Yes')
    else:
        print('No')
Buggy python submission (verdict: Time Limit Exceeded):
num = int(input())
numbers_row = input().split(" ")
numbers = []
for i in numbers_row:
  numbers.append(int(i))
  
noBool = "YES"
 
for i, number in enumerate(numbers):
  for j in numbers[i+1:]:
    if j == number:
      noBool = "NO"
      break
print(noBool)

Fixed submission:
num = int(input())
numbers_row = input().split(" ")
numbers = []
for i in numbers_row:
  numbers.append(int(i))
  
Bool = len(numbers) != len(set(numbers))

if Bool == True:
    print("NO")
else:
    print("YES")

Buggy python submission (verdict: Time Limit Exceeded):
num = int(input())
numbers_row = input().split(" ")
numbers = []
for i in numbers_row:
  numbers.append(int(i))
  
noBool = False

for i, number in enumerate(numbers):
  for j in numbers[i+1:]:
    if j == number:
      noBool = True
      break

if noBool == False:
  print("YES")
else:
  print("NO")

Fixed submission:
num = int(input())
numbers_row = input().split(" ")
numbers = []
for i in numbers_row:
  numbers.append(int(i))
  
Bool = len(numbers) != len(set(numbers))

if Bool == True:
    print("NO")
else:
    print("YES")
Buggy python submission (verdict: Runtime Error):
hp_list = input().split(" ")
h = hp_list[0]
a = hp_list[1]
x = h / a
y = h // a
if (x == y):
  count = x
else:
  count = y + 1
 
print(count)


Fixed submission:
hp_list = input().split(" ")
h = int(hp_list[0])
a = int(hp_list[1])
x = h / a
y = h // a
if (x == y):
  count = x
else:
  count = y + 1

count = int(count)
print(count)
Buggy python submission (verdict: Runtime Error):
def main():
    N = int(input())
    slimes = list(map(int, input().split()))
    ans = 0

    for i in range(1, N):
        if slimes[i-1] == slimes[i]:
            slimes[i] = 10001 + ans
            assert slimes[i] != slimes[i-1]
            assert slimes[i] != slimes[i+1]
            ans += 1

    print(ans)


if __name__ == '__main__':
    main()

Fixed submission:
def main():
    N = int(input())
    slimes = list(map(int, input().split()))
    ans = 0

    for i in range(1, N):
        if slimes[i-1] == slimes[i]:
            slimes[i] = 10001 + ans
            # assert slimes[i] != slimes[i-1]                                 
            # assert slimes[i] != slimes[i+1]                                 
            ans += 1

    print(ans)


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

import os
import sys
import math
import numpy as np


N = int(input())
A = np.array([int(input()) for i in range(N)])

counter = np.zeros(np.max(A)+1)

for a in A:
    counter[a] += 1

counter %= 2

print(int(np.sum(counter)))

Fixed submission:
# -*- coding: utf-8 -*-

import os
import sys
import math
import numpy as np


N = int(input())
A = np.array([int(input()) for i in range(N)])

counter = {}

for a in A:
    if a in counter.keys():
        counter[a] = abs(counter[a] - 1)
    else:
        counter[a] = 1

print(sum(counter.values()))
Buggy python submission (verdict: Runtime Error):
import sys


if __name__ == "__main__":
    N = int(input())

    rates = [map(int, raw_input().split()) for i in range(N)]
    # tasks = np.array(tasks)
    normal_colors = int(3200/400)
    colors = [None] * normal_colors
    any = 0
    for rate in rates:
        if rate >= 3200:
            any +=1
        else:
            colors[rate/400] = 1
    print(sum(colors), sum(colors)+any)

Fixed submission:
import sys


if __name__ == "__main__":
    N = int(input())

    rates = map(int, raw_input().split())
    # rates = [map(int, raw_input().split()) for i in range(N)]

    # tasks = np.array(tasks)
    normal_colors = int(3200/400)
    colors = [0] * normal_colors
    aaa = 0
    for rate in rates:
        if rate >= 3200:
            aaa +=1
        else:
            colors[rate/400] = 1

    print max(sum(colors),1), sum(colors)+aaa
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

import os
import sys
import math
import numpy as np

n, m = map(int, input().split())
X = input().split()
X = list(map(int, X))
Y = input().split()
Y = list(map(int, Y))


# 1 つの最小長方形は (n-1)*(m-1) 回加算される

S = 0
mod = 10 ** 9 + 7

for x in range(n-1):
	for y in range(m-1):
		var = (X[x+1]-X[x]) * (Y[y+1]-Y[y])
		# print(var)
		x_times = (x+1) * (n-x-1)
		y_times = (y+1) * (m-y-1)

		S += ((var * x_times * y_times) % mod)


print(S%mod)

Fixed submission:
# -*- coding: utf-8 -*-                                                

import os
import sys
import math
import numpy as np

a, b, c = map(int, input().split())
if (b - a) == (c - b):
    print('YES')
else:
    print('NO')

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-                                                

import os
import sys
import math
import numpy as np

O = input()
E = input()
ans = ''
for i in range(len(E)):
    ans += O[i]
    ans += E[i]

if len(O) != len(E):
    ans += O[-1]

print(ans)

Fixed submission:
# -*- coding: utf-8 -*-                                                

import os
import sys
import math
import numpy as np

a, b, c = map(int, input().split())
if (b - a) == (c - b):
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Runtime Error):

import argparse

def main(s: str):
    if s[0] == s[1] == s[2]:
        return "No"
    else:
        return "Yes"

if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("s", type=str)
    args = parser.parse_args()
    print(main(args.s))

Fixed submission:
import argparse

def main(s: str):
    if s[0] == s[1] == s[2]:
        return "No"
    else:
        return "Yes"

if __name__ == "__main__":
    s = input()
    print(main(s))
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())


if a == b:
    num1 = a
else:
    num1 = a - b

if c =< num1:
    print(0)
else:
    print(c - num1)

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

diff = a - b

if c < diff:
    print(0)
else:
    print(c - diff)
Buggy python submission (verdict: Runtime Error):
a, b = list(map(int, input().split()))

    if a > b:
        print(str(b)*a)
    else:
        print(str(a)*b)

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

if a > b:
    print(str(b)*a)
else:
    print(str(a)*b)
Buggy python submission (verdict: Runtime Error):
s = input()
if s == 'AAA':
  print 'No'
elif s == 'BBB':
  print 'No'
else:
  print 'Yes'

Fixed submission:
s = input()
if s == 'AAA':
  print('No')
elif s == 'BBB':
  print('No')
else:
  print('Yes')
Buggy python submission (verdict: Time Limit Exceeded):
s = list(input())
q = int(input())

for i in range(q):
  query = input()
  if query[0] == '1':
    s.reverse()
  else:
    t, f, c = query.split()
    if f == '1':
      s.insert(0,c)
    else:
      s.append(c)

print(''.join(s))

Fixed submission:
s = input()
q = int(input())

start = ''
end = ''

rvs = False

for i in range(q):
  query = input()
  if query[0] == '1':
    if rvs == False:
      rvs = True
    else:
      rvs = False
  else:
    t, f, c = query.split()
    if f == '1':
      if rvs == False:
        start = c + start
      else:
        end = end + c
    else:
      if rvs == False:
        end = end + c
      else:
        start = c + start

if rvs == False:
  print(start + s + end)
else:
  ans = start + s + end
  print(ans[::-1])

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
q = int(input())

for i in range(q):
  query = input()
  if query[0] == '1':
    s = s[::-1]
  else:
    t, f, c = query.split()
    if f == '1':
      s = c + s
    else:
      s = s + c

print(s)

Fixed submission:
s = input()
q = int(input())

start = ''
end = ''

rvs = False

for i in range(q):
  query = input()
  if query[0] == '1':
    if rvs == False:
      rvs = True
    else:
      rvs = False
  else:
    t, f, c = query.split()
    if f == '1':
      if rvs == False:
        start = c + start
      else:
        end = end + c
    else:
      if rvs == False:
        end = end + c
      else:
        start = c + start

if rvs == False:
  print(start + s + end)
else:
  ans = start + s + end
  print(ans[::-1])
Buggy python submission (verdict: Runtime Error):
n = input()
return (n // 2) + (n % 2) 

Fixed submission:
n = int(input())
ans = (n // 2) + (n % 2)
print(ans)
Buggy python submission (verdict: Runtime Error):
n,a,b = list(map(int,input().split()))
if (b-a)%2==1:
    if a-1 > n-b:
        q=n-b+1
        z=n-q
        print((q+z)/2
    else:
        z=b-a
        print((z-1)/2)

Fixed submission:
n,a,b = list(map(int,input().split()))
z=b-a
if z%2==1:
    print(min(a-1,n-b)+1+(z-1)//2)
else:
    print(z//2)
Buggy python submission (verdict: Runtime Error):
from math import ceil,sqrt,gcd,log,floor
from collections import deque
def ii(): return int(input())
def si(): return input()
def mi(): return map(int,input().strip().split(" "))
def li(): return list(mi())
def msi(): return map(str,input().strip().split(" "))
def lsi(): return list(msi())
#for _ in range(ii()):
n=ii()
print(n//2+n%2)

Fixed submission:
n=int(input())
print(n//2+n%2)

Buggy python submission (verdict: Runtime Error):
'''
    Auther: ghoshashis545 Ashis Ghosh
    college: jalpaiguri Govt Enggineering College
    Date:06/03/2020
'''
from math import ceil,sqrt,gcd,log,floor
from collections import deque
def ii(): return int(input())
def si(): return input()
def mi(): return map(int,input().strip().split(" "))
def li(): return list(mi())
def msi(): return map(str,input().strip().split(" "))
def lsi(): return list(msi())
#for _ in range(ii()):
n=ii()
print(ceil(n/2))

Fixed submission:
n=int(input())
print(n//2+n%2)

Buggy python submission (verdict: Runtime Error):
'''
    Auther: ghoshashis545 Ashis Ghosh
    college: jalpaiguri Govt Enggineering College
    Date:06/03/2020
'''
from math import ceil,sqrt,gcd,log,floor
from collections import deque
def ii(): return int(input())
def si(): return input()
def mi(): return map(int,input().strip().split(" "))
def li(): return list(mi())
def msi(): return map(str,input().strip().split(" "))
def lsi(): return list(msi())
#for _ in range(ii()):
n=ii()
print(ceil(n/2))

Fixed submission:
n=int(input())
print(n//2+n%2)
Buggy python submission (verdict: Runtime Error):
n = int(input())
x = list(map(int, input().strip().split()))
alist=[]
for p in range (min(x),max(x)):
    ans=0
    for xi in x:
        ans += (xi-p)**2
    alist.append(ans)
    
print(min(alist))
    

Fixed submission:
n = int(input())
x = list(map(int, input().strip().split()))
alist=[]
pm=10e9
for p in range (min(x),max(x)+1):
    ans=0
    for xi in x:
        ans += (xi-p)**2

    if(ans<pm):
        pm=ans
print(pm)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a=[]
for i in range(n):
    a.append(input())


a_f = list(set(a))
num = []


for i in a_f: 
    num.append(a.count(i))
    
result=[]
    
for n, i in enumerate(num):
    if i == max(num):
        result.append(a_f[n])
        
a_i=sorted(result)

for i in a_i:
    print(i)

Fixed submission:
n = int(input())
l=[]
for i in range(n):
    l.append(input())
from collections import Counter
S=Counter(l)#カウンタークラスが作られる。S=Counter({'b': 5, 'c': 4, 'a': 3})

mn = max(S.values())
for letter, count in sorted(S.most_common()):
    if(count==mn):
        print(letter)
Buggy python submission (verdict: Runtime Error):
import math
n = int(input()) 

def is_prime(n):
    if n == 1: return True

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False
    return True

if(is_prime(n)):
    print(n)
else:
    while(is_prime(n) == False):
        n = n + 1
        is_prime(n)
    print(n)
        
    

Fixed submission:
s = input().split()

print(s[1]+s[0])
Buggy python submission (verdict: Runtime Error):
n = int(input()) 

if(is_prime(n)):
    print(n)
else:
    while(is_prime(n) == False):
        n = n + 1
        is_prime(n)
    print(n)
        
    

Fixed submission:
n = int(input()) 

import math
def is_prime(n):
    if n == 1: return True

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False
    return True

if(is_prime(n)):
    print(n)
else:
    while(is_prime(n) == False):
        n = n + 1
        is_prime(n)
    print(n)

Buggy python submission (verdict: Runtime Error):
n = int(input()) 

if(is_prime(n)):
    print(n)
else:
    while(is_prime(n) == False):
        n = n + 1;
        is_prime(n)
    print(n)
        
    

Fixed submission:
n = int(input()) 

import math
def is_prime(n):
    if n == 1: return True

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False
    return True

if(is_prime(n)):
    print(n)
else:
    while(is_prime(n) == False):
        n = n + 1
        is_prime(n)
    print(n)
Buggy python submission (verdict: Runtime Error):
str1 = input()
str2 = list(str1)
n = (int(len(str1)/2))
count = 0
for i in range(1, n+1):
    if(str2[i-1]!=str2[-1*i]):
    count = count+1        
print(count)

       
     

Fixed submission:
str1 = input()
str2 = list(str1)
n = (int(len(str1)/2))
count = 0
for i in range(1, n+1):
    if(str2[i-1]!=str2[-1*i]):
        count = count+1        
print(count)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

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

count = 0

for index, a_item in enumerate(a):
    ab = a[index:].count(a_item)
    if ab >= 2:
        count += 1
        break

if count == 0:
    print('YES')
else:
    print('NO')

Fixed submission:
n = int(input())

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

a.sort()

count = 0

for i in range(n-1):
    if a[i] == a[i+1]:
        count += 1

if count == 0:
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())


list = [1,2,3]

list.pop(a)
list.pop(b)

print(list[0])


Fixed submission:
a = int(input())
b = int(input())

list = [1,2,3]

list.remove(a)
list.remove(b)

print(list[0])

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

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


truelist = [1,2,3]

truelist.pop(a)
truelist.pop(b)

print(truelist[0])


Fixed submission:
a = int(input())
b = int(input())

list = [1,2,3]

list.remove(a)
list.remove(b)

print(list[0])
Buggy python submission (verdict: Runtime Error):


length =int(input())

s, t = map(int, input().split())

result = ""

for i in s:
  list_t = list(t)
  result = result + s + list_t[i]
 
print(result) 


Fixed submission:
length =int(input())

s, t = map(str, input().split())

result = ""

list_s = list(s)
list_t = list(t)

for i in range(length):
  result = result + list_s[i]
  result = result + list_t[i]
  #result = result + s + list_t[i]
 
print(result)
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())

result = a + b + c

if result => 22:
    print('bust')
else:
    print('win')

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

result = a + b + c

if result >= 22:
    print('bust')
else:
    print('win')
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# 整数の入力
n = int(input())
a = int(input())
# スペース区切りの整数の入力
# b, c = map(int, input().split())
# 文字列の入力
# s = input()
# # 出力
# print("{} {}".format(a+b+c, s))

if n < 500:
    if n > a:
        print('Yes')
    else:
        print('No')
else:    
    amari = n%500

    if amari =< a:
        print('Yes')
    else:
        print('No')

Fixed submission:
# -*- coding: utf-8 -*-
# 整数の入力
n = int(input())
a = int(input())


if n < 500:
    if n <= a:
        print('Yes')
    else:
        print('No')
else:    
    amari = n%500
    if amari <= a:
        print('Yes')
    else:
        print('No')

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# 整数の入力
n = int(input())
a = int(input())
# スペース区切りの整数の入力
# b, c = map(int, input().split())
# 文字列の入力
# s = input()
# # 出力
# print("{} {}".format(a+b+c, s))

amari = n%500

if amari =< a:
    print('Yes')
else:
    print('No')

Fixed submission:
# -*- coding: utf-8 -*-
# 整数の入力
n = int(input())
a = int(input())


if n < 500:
    if n <= a:
        print('Yes')
    else:
        print('No')
else:    
    amari = n%500
    if amari <= a:
        print('Yes')
    else:
        print('No')
Buggy python submission (verdict: Time Limit Exceeded):
from collections import defaultdict
N = int(input())
mm = defaultdict(int)

for i in range(N):
    key = input()
    mm[key] += 1

max_mms = [kv for kv in mm.items() if kv[1] == max(mm.values()) ]
max_mms.sort()

for i, k in max_mms:
    print(i)


Fixed submission:
from collections import defaultdict
N = int(input())
mm = defaultdict(int)

for i in range(N):
    key = input()
    mm[key] += 1

max_val= max(mm.values())
mm_max = []
for kv in mm.items():
    if kv[1] == max_val:
        mm_max.append(kv)

mm_max.sort()
for v in mm_max:
    print(v[0])

Buggy python submission (verdict: Time Limit Exceeded):
from collections import defaultdict
import heapq

N = int(input())
mm = defaultdict(int)

for i in range(N):
    key = input()
    mm[key] += 1


max_mms = [kv for kv in mm.items() if kv[1] == max(mm.values()) ]
max_mms.sort()

for i,k in max_mms:
    print(i)


Fixed submission:
from collections import defaultdict
N = int(input())
mm = defaultdict(int)

for i in range(N):
    key = input()
    mm[key] += 1

max_val= max(mm.values())
mm_max = []
for kv in mm.items():
    if kv[1] == max_val:
        mm_max.append(kv)

mm_max.sort()
for v in mm_max:
    print(v[0])
Buggy python submission (verdict: Runtime Error):
H = int(input())

def f(hp):
    if hp == 1:
        return 1
    return f(hp/2)*2+1

print(f(H))

Fixed submission:
def f(hp):
    if hp == 1:
        return 1
    return 2 * f(int(hp/2)) + 1

H = int(input())
print(f(H))
Buggy python submission (verdict: Time Limit Exceeded):
k,s = map(int,input().split())
ans = 0
for x in range(k+1):
    for y in range(k+1):
        for z in range(k+1):
            if x + y + z == s:
                ans += 1

print(ans)


Fixed submission:
k,s = map(int,input().split())
ans = 0
for x in range(k+1):
    for y in range(k+1):
        z = s - x - y
        if z >= 0 and z <= k:
            ans +=1
print(ans)
Buggy python submission (verdict: Runtime Error):
if a==1 :
    if b==2:
        print(3)
    elif b==3:
        print(2)
elif a ==2 :
    if b==1:
        print(3)
    elif b==3:
        print(1)
else:
    if b==1:
        print(2)
    elif b==2:
        print(1)

Fixed submission:
a = int(input())
b = int(input())

if a==1 :
    if b==2:
        print(3)
    elif b==3:
        print(2)
elif a ==2 :
    if b==1:
        print(3)
    elif b==3:
        print(1)
else:
    if b==1:
        print(2)
    elif b==2:
        print(1)
Buggy python submission (verdict: Runtime Error):
import math

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


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

print(lcm(a, b))

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

x = a * b;

if a<b:
    tmp = a
    a = b
    b = tmp

r = a % b
while r!=0:
    a = b
    b = r
    r = a % b
 
print(int(x/b))
Buggy python submission (verdict: Runtime Error):
k,x = map(int,input().split())
a = 500*k
if a >= x:
    print('Yes')
else:
    print('No')


Fixed submission:
c = input()
ans = chr(ord(c)+1)
print(ans)
Buggy python submission (verdict: Runtime Error):
n,k = map(int,input().split())
r,s,p = map(int,input().split())
t = input()
l = {'r':'p','s':'r','p':'s'}
L = ['' for i in range(n)]
tmp = ['r','s','p']
for i in range(n):
    x = t[i]
    if (i - k) >= 0 and L[i-k] == l[x]:
        tmp.remove(L[i-k])
        if (i + k) <= n and l[t[i+k]] != l[x]:
            tmp.remove(l[t[i+k]])
        L[i] = tmp[0]
        tmp = ['r','s','p']
    else:
        L[i] = l[x]

score = 0
sc = {'r':r,'s':s,'p':p}
for i in range(n):
    if l[t[i]] == L[i]:
        score += sc[L[i]]

print(score)


Fixed submission:
n,k = map(int,input().split())
r,s,p = map(int,input().split())
t = input()
l = {'r':'p','s':'r','p':'s'}
L = ['' for i in range(n)]
tmp = ['r','s','p']
for i in range(n):
    x = t[i]
    if (i - k) >= 0 and L[i-k] == l[x]:
        tmp.remove(L[i-k])
        if (i + k) <= (n-1) and l[t[i+k]] != l[x]:
            tmp.remove(l[t[i+k]])
        L[i] = tmp[0]
        tmp = ['r','s','p']
    else:
        L[i] = l[x]

score = 0
sc = {'r':r,'s':s,'p':p}
for i in range(n):
    if l[t[i]] == L[i]:
        score += sc[L[i]]

print(score)