Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p03774 (python)

Fixed submission:
N, M = map(int, input().split())
students = [list(map(int, input().split())) for i in range(N)]
checkpoints = [list(map(int, input().split())) for i in range(M)]

for s in students:
    min_distance = 4 * 10**8 + 1
    for i, c in enumerate(checkpoints):
        distance = abs(s[0] - c[0]) + abs(s[1] - c[1]) 
        if min_distance > distance:
            min_distance = distance
            point = i+1
    print(point)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
students = [list(map(int, input().split())) for i in range(N)]
checkpoints = [list(map(int, input().split())) for i in range(M)]

for s in students:
    min_distance = 2 * 10**8 + 1
    for i, c in enumerate(checkpoints):
        distance = abs(s[0] - c[0]) + abs(s[1]- c[1]) 
        if min_distance > distance:
            min_distance = distance
            point = i+1
    print(point)
Problem p02835 (python)

Fixed submission:
a1, a2, a3 = [int(x) for x in input().split()]

s = a1 + a2 + a3

if s >= 22:

    print('bust')

else:

    print('win')

Buggy submission (verdict: Runtime Error):
A1 = int(input())

A2 = int(input())

A3 = int(input())


s = A1 + A2 + A3

if s >= 22:

    print('bust')

else:

    print('win')
Problem p02847 (python)

Fixed submission:
s = str(input())
  
if s == 'SAT':
  print('1')
  
elif s == 'FRI':
  print('2')
  
elif s == 'THU':
  print('3')
  
elif s == 'WED':
  print('4')

elif s == 'TUE':
  print('5')
  
elif s == 'MON':
  print('6')

else:
  print('7')

Buggy submission (verdict: Runtime Error):
n = int(input())
s = str(input())
alp = 'abcdefghijklmnopqrstuvwxyz' * 2
ss = ''

for i in range(len(s)):

    ss += str(alp[alp.index(s[i])+n])

print(ss)

Buggy submission (verdict: Runtime Error):
s = str(input('曜日を入力：'))
  
elif s == 'SAT':
  print('1')
  
elif s == 'FRI':
  print('2')
  
elif s == 'THU':
  print('3')
  
elif s == 'WED':
  print('4')

elif s == 'TUE':
  print('5')
  
elif s == 'MON':
  print('6')

else:
  print('7')
Problem p02880 (python)

Fixed submission:
n = int(input())

for i in range(9):

     if n%(i+1) == 0 and n//(i+1) < 10:
         print('Yes')
         break

else:
    print('No')

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

for i in range(9):

     if n%i == 0 and n//i < 10:
         print('Yes')
         break

else:
    print('No')
Problem p02897 (python)

Fixed submission:
n = int(input())

if n % 2 == 0:

    print(1 / 2)

else:

    print((n + 1) / 2 / n)

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

if n % 2 = 0:

    print(1 / 2)

else:

    print((n + 1) / 2n)

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

if n % 2 == 0:

    print(1 / 2)

else:

    print((n + 1) / 2n)

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

if n // 2 == 0:

    print(1 / 2)

else:

    print((n + 1) / 2n)
Problem p02915 (python)

Fixed submission:
n = int(input())

print(n ** 3)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
tmp = 0

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

print(sum(b)+tmp)
Problem p02916 (python)

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

for i in range(n-1):
    if a[i+1] == a[i]+1:
        b.append(c[a[i]-1])

print(sum(b))

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
tmp = 0

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

print(sum(b)+tmp)
Problem p02987 (python)

Fixed submission:
s = str(input())

if s[0] == s[1] and s[2] == s[3] and s[0] != s[2]:
    print('Yes')

elif s[0] == s[2] and s[1] == s[3] and s[0] != s[1]:
    print('Yes')

elif s[0] == s[3] and s[1] == s[2] and s[0] != s[1]:
    print('Yes')

else:
    print('No')

Buggy submission (verdict: Runtime Error):
s = str(input())

if s[0] == s[1] and s[2] = s[3] and s[0] != s[2]:
    print('Yes')

elif s[0] == s[2] and s[1] == s[3] and s[0] != s[1]:
    print('Yes')

elif s[0] == s[3] and s[1] == s[2] and s[0] != s[1]:
    print('Yes')

else:
    print('No')

Buggy submission (verdict: Runtime Error):
s = str(input())

if s[0] == s[1] and s[2] = s[3] and s[0] =! s[2]:
    print('Yes')

elif s[0] == s[2] and s[1] == s[3] and s[0] =! s[1]:
    print('Yes')

elif s[0] == s[3] and s[1] == s[2] and s[0] =! s[1]:
    print('Yes')

else:
    print('No')
Problem p03041 (python)

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

if s[k-1] == 'A':
    print(s[:k-1] + 'a' + s[k:])

elif s[k-1] == 'B':
    print(s[:k-1] + 'b' + s[k:])

else:
    print(s[:k-1] + 'c' + s[k:])

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

if s[k-1] == 'A':
    print(s[:k-1]　+ 'a' + s[k:])

elif s[k-1] == 'B':
    print(s[:k-1] + 'b' + s[k:])

else:
    print(s[:k-1] + 'c' + s[k:])

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
s = str(input())

if s[k-1] == 'A':
    print(s[:k-1]　+ 'a' + s[k:])

elif s[k-1] == 'B':
    print(s[:k-1] + 'b' + s[k:])

else:
    print(s[:k-1] + 'c' + s[k:])

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
s = str(input())

if s[k-1] == 'A':
    s[k-1] = 'a'

elif s[k-1] == 'B':
    s[k-1] = 'b'

elif s[k-1] == 'C':
    s[k-1] = 'c'
    
print(s)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
s = str(input())

if s[k-1] == 'A':
    s[k-1] = 'a'

elif s[k-1] == 'B':
    s[k-1] = 'b'

elif s[k-1] == 'C':
    s[k-1] = 'c'

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
s = str(input())

x = str(s[k-1])
y = x.lower()
s[k-1] = y

print(s)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
s = str(input())

x = s[k-1]
y = x.lower()
s[k-1] = y

print(s)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
s = str(input())

x = s[k-1]
y = x.capitalize()
s[k-1] = y

print(s)
Problem p03075 (python)

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

if k >= max(a,b,c,d,e) - min(a,b,c,d,e):
    print('Yay!')

else:
    print(':(')

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

x = list[a,b,c,d,e]
y = sorted(x)

if k >= y[4] -y[0]:
    print('Yay!')

else:
    print(':(')

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

x = list(a,b,c,d,e)
y = sorted(x)

if k >= y[4] -y[0]:
    print('Yay!')

else:
    print(':(')
Problem p03250 (python)

Fixed submission:
a, b, c = map(int, input().split())
x = sorted([a, b, c])

print(x[2]*10 + x[0] + x[1])

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
x = [sorted(a, b, c)]

print(x[2]*10 + x[0] + x[1])

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
x = [sorted(a, b, c)]

print(x[3]*10 + x[1] + x[2])
Problem p03804 (python)

Fixed submission:
n,m = map(int,input().split())
a = [str(input()) for _ in range(n)]
b = [str(input()) for _ in range(m)]
flag = False
for l in range(n-m+1):
    for k in range(n-m+1):
        cnt = 0
        for i in range(m):
            for j in range(m):
                if a[k+i][j+l]==b[i][j]:
                    cnt += 1
            if cnt==m**2:
                flag = True
                break
        if flag:
            break
    if flag:
        break
print('Yes' if flag else 'No')

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
a = [str(input()) for _ in range(n)]
b = [str(input()) for _ in range(m)]
flag = False
for k in range(n-m+1):
    cnt = 0
    for i in range(m):
        for j in range(m):
            if b[k+i][j]==a[k+i][j]:
                cnt += 1
        if cnt==m**2:
            flag = True
            break
    if flag:
        break
print('Yes' if flag else 'No')
Problem p03834 (python)

Fixed submission:
s = str(input())
ans = ''

for i in range(19):
    
    if i==5 or i==13:
        ans += ' '

    else:
        ans += s[i]

print(ans)

Buggy submission (verdict: Runtime Error):
s = str(input())
ans = ''

for i in range(19):
    
    if i==5 or i==13
        ans += ' '

    else:
        ans += s[i]

print(ans)

Buggy submission (verdict: Runtime Error):
s = str(input())
ans = ''

for i in range(19):
    
    if i == 5 or 13
        ans += ' '

    else:
        ans += s[i]

print(ans)

Buggy submission (verdict: Runtime Error):
s = str(input())
ans = ''

for i in range(19):
    
    if i==5 or i==13
        ans += ','
    else:
        ans += s[i]

print(ans)

Buggy submission (verdict: Runtime Error):
s = str(input()) 
lst = [s[0:5], , s[6:13], , s[14:]]
print(''.join(lst))

Buggy submission (verdict: Runtime Error):
s = str(input())
print(s[0:5]+' '+s[6:13]+' '+s[14:]

Buggy submission (verdict: Runtime Error):
a, b, c = map(str, input().split(,))

print(a+''+b+''+c)
Problem p02831 (python)

Fixed submission:

def gcd(a,b):
    if(a>b):a,b=b,a
    if(a==0):return b
    return gcd(b%a,a)

a,b=map(int,input().split())
print(int(a*b/gcd(a,b)))

Buggy submission (verdict: Runtime Error):

import math

a,b=map(int,input().split())
print(int(a*b/math.gcd(a,b)))

Buggy submission (verdict: Runtime Error):

def gcd(a,b):
    if(a>b):swap(a,b)
    if(a==0):return b
    return gcd(b%a,a)

a,b=map(int,input().split())
print(int(a*b/gcd(a,b)))
Problem p02879 (python)

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

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
if(a>=10):
    print(-1)
elif(b>=10):
    print(-1)
else:
    print(a*b)
    
#print(a+1)
#print(b+1)

Buggy submission (verdict: Runtime Error):
a=int(input())
if a>=10:
    print(-1)
else:
    b=int(input())
    if b>=10:
        print(-1)
    else:
        print(a*b)

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
if a>=10:
    print(-1)
elif b>=10:
    print(-1)
else:
    print(a*b)
Problem p02880 (python)

Fixed submission:
n=int(input())
ifbreak = "FALSE"
for i in range(9):
  for j in range(9):
    if n == ((i+1)*(j+1)):
      print("Yes")
      ifbreak = "TRUE"
      break
  if ifbreak=="TRUE":
    break
if ifbreak == "FALSE":
  print("No")

Buggy submission (verdict: Runtime Error):
n=int(input())
ifbreak = "FALSE"
for i in range(n**0.5):
  for j in range(**0.5):
    print(i,j)
Problem p03250 (python)

Fixed submission:
abc =list(map(int,input().split(" "))) 
m = max(abc)
s = sum(abc)
ans = s-m+(m*10)
print(ans)

Buggy submission (verdict: Runtime Error):
abc = list(map(int,input().split(" "))
m = max(abc)
s = sum(abc)
ans = s-m+(m*10)
print(ans)
Problem p03272 (python)

Fixed submission:
n, i = map(int,input().split(" "))
ans = n - i + 1
print(ans)

Buggy submission (verdict: Runtime Error):
n, i = map(int,input().sprit(" "))
ans = n - i + 1
print(ans)
Problem p03208 (python)

Fixed submission:
n,k = map(int,input().split())
h=list(int(input()) for i in range(n))
h.sort()
mi=float('inf')

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

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
h=[int(input()) for i in range(n)]
h=sort(h)
mi=float('inf')
 
for i in range(n-k+1):
    mi = min(mi, h[i+k-1]-h[i])
 
print(mi)
Problem p02829 (python)

Fixed submission:
a = input()
b = input()
 
answer_list = ["1","2","3"]
answer_list.remove(a)
answer_list.remove(b)
 
print(answer_list[0])

Buggy submission (verdict: Runtime Error):
x,y = input().split()
x = int(x)
y = int(y)
if x < y:
  a = y
  b = x
else:
  a = x
  b = y
 
while b:
  a, b = b, a % b
 
print(int(x*y/a))

Buggy submission (verdict: Runtime Error):
x,y = input().split()
x = int(x)
y = int(y)
if x < y:
  a = y
  b = x
else:
  a = x
  b = y
 
while b:
  a, b = b, a % b
 
print(x*y//a)

Buggy submission (verdict: Runtime Error):
N = input()
S,T = input().split()
 
a = ""
for i in range(N):
  a+=S[i]+T[i]
print(a)

Buggy submission (verdict: Runtime Error):
a = input()
b = input()
 
answer_list = {"1","2","3"}
answer_list.remove(a)
answer_list.remove(b)
 
print(answer_list[0])

Buggy submission (verdict: Runtime Error):
a = input()
b = input()

answer_list = {"1","2","3"}
answer_list -= a
answer_list -= b

print(answer_list[0])
Problem p02832 (python)

Fixed submission:
N = int(input())
a = input().split()
for i in range(N):
  a[i] = int(a[i])
index = 1
count = 0
for i in range(N):
  if a[i] == index:
  	index += 1
  else:
    count += 1
if count == N:
  count = -1
print(count)

Buggy submission (verdict: Runtime Error):
N = int(input())
a = input().split()
for i in range(N):
  a[i] = int(a[i])
index = 1
count = 0
for i in range(N):
  if a[i] = index:
  	index += 1
  else:
    count += 1
print(count)
Problem p02829 (python)

Fixed submission:
a = int(input())
b = int(input())
l = list(range(4))
del l[0]
l.remove(a)
l.remove(b)
print(l[0])

Buggy submission (verdict: Runtime Error):
import math
a,b = list(map(int, input().split()))

def gcd( x, y ):
    while y != 0:
        x, y = y, x%y
    return x

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

print(lcm(a, b))
Problem p02831 (python)

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

def gcd( x, y ):
    while y != 0:
        x, y = y, x%y
    return x

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

print(lcm(a, b))

Buggy submission (verdict: Runtime Error):
import math
a,b = list(map(int, input().split()))

def gcd( x, y ):
    while y != 0:
        x, y = y, x%y

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

print(lcm(a, b))

Buggy submission (verdict: Runtime Error):
import math
a,b = list(map(int, input().split()))

def gcd( x, y ):
    while y != 0:
        x, y = y, x%y

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

print(lcm(a, b))

Buggy submission (verdict: Runtime Error):
import math
a,b = list(map(int, input().split()))

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

print(lcm(a, b))
Problem p02829 (python)

Fixed submission:
print(6-int(input())-int(input()))

Buggy submission (verdict: Runtime Error):
print(6-int(input()-int(input()))
Problem p02831 (python)

Fixed submission:
def gcd(x,y):
    tmp = x
    x = x if x >= y else y
    if tmp != x:
        y = tmp
    if y == 0:
        return x
    return gcd(x%y, y)

A,B =  [int(x) for x in input().split(" ")]
def lcm(x, y):
    return (x * y) // gcd(x, y)
print(lcm(A,B))

Buggy submission (verdict: Runtime Error):
def gcd(x,y):
   tmp = x
    x = x if x >= y else y
    if tmp != x:
        y = tmp
    if y == 0:
        return x
    return gcd(x%y, y)
    
A,B =  [int(x) for x in input().split(" ")]
def lcm(x, y):
    return (x * y) // gcd(x, y)
print(lcm(A,B))

Buggy submission (verdict: Runtime Error):
def gcd(x,y):
   tmp = x
    x = x if x >= y else x=y
    if tmp != x:
        y = tmp
    if y == 0:
        return x
    return gcd(x%y, y)
    
A,B =  [int(x) for x in input().split(" ")]
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
print(lcm(A,B))

Buggy submission (verdict: Runtime Error):
def gcd(x,y):
   tmp = x
    x = x if x >= y else y
    if tmp != x:
        y = tmp
    if y == 0:
        return x
    return gcd(x%y, y)
    
A,B =  [int(x) for x in input().split(" ")]
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
print(lcm(A,B))

Buggy submission (verdict: Runtime Error):
import math
A,B =  [int(x) for x in input().split(" ")]
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
print(lcm(A,B))
Problem p02847 (python)

Fixed submission:
def when_sunday(day):
    week_d = ["MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN"]
    if day == "SUN":
        return 7
    return 6 - week_d.index(day)
  
print(when_sunday(input()))

Buggy submission (verdict: Runtime Error):
def when_sunday(day):
    week_d = ["MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN"]
    if day == "SUN":
        return 7
    return 6 - week_d.index(day)
  

print(when_sunday(input())
Problem p02879 (python)

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

valid = range(1, 10)
if a in valid and b in valid:
    print(a*b)
else:
    print(-1)

Buggy submission (verdict: Runtime Error):
a, b = map(int(input().split()))

valid = range(1, 10)
if a in valid and b in valid:
  print(a*b)
else:
  print(-1)
Problem p02881 (python)

Fixed submission:
n = int(input())

def min_walk(n):
    out = []
    for a in range(1, int(n**0.5)+1):
        if n % a == 0:
            out.append(a + (n//a) - 2)

    return min(out)


print(min_walk(n))

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

def min_walk(n):
    out = []
    for a in range(1, int(n**0.5)):
        if n % a == 0:
            out.append(a + (n//a) - 2)

    return min(out)


print(min_walk(n))
Problem p02829 (python)

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


def main():
    A = int(input())
    B = int(input())

    print('{}'.format(6 - A - B))


if __name__ == "__main__":
    main()

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


def main():
    A, B = [int(_) for _ in input().split()]

    product = A * B
    for divisor in range(min([A, B]) // 2, 2, -1):
        if A % divisor == 0 and B % divisor == 0:
            A = A // divisor
            B = B // divisor
            product = product // divisor

    print(product)


def correct_1():
    A, B = [int(_) for _ in input().split()]

    for i in range(1, B + 1):
        if A * i % B == 0:
            print(A * i)
            break


def correct_2():
    A, B = [int(_) for _ in input().split()]

    def gcd(a, b):
        while b != 0:
            a, b = b, a % b
        return a

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

    print(lcm(A, B))


if __name__ == "__main__":
    correct_1()

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


def main():
    A, B = [int(_) for _ in input().split()]

    product = A * B
    for divisor in range(min([A, B]) // 2, 1, -1):
        if A % divisor == 0 and B % divisor == 0:
            A = A // divisor
            B = B // divisor
            product = product // divisor

    print(product)


if __name__ == "__main__":
    main()
Problem p02897 (python)

Fixed submission:
a=int(input())
b=(a+1)/(2*a)
if a%2==0:
  print(0.5)
else:
  print(b)

Buggy submission (verdict: Runtime Error):
a=input()
b=(a+1)/2*a
if a%2==0:
  print(0.5)
else:
  print(b)

Buggy submission (verdict: Runtime Error):
a=int(input())
b=(a+1)/2*a
if a%2=1:
  print(0.5)
else:
  print(b)
Problem p02987 (python)

Fixed submission:
a=input()
if a[0]==a[1] and a[2]==a[3] and a[0]!=a[2]:
  print('Yes')
elif a[0]==a[2] and a[1]==a[3] and a[0]!=a[1]:
  print('Yes')
elif a[0]==a[3] and a[1]==a[2] and a[0]!=a[1]:
  print('Yes')  
else:
  print('No')

Buggy submission (verdict: Runtime Error):
a=input()
if a[0]=a[1] and a[2]=a[3]:
  print('Yes')
elif a[0]=a[2] and a[1]=a[3]:
  print('Yes')
elif a[0]=a[3] and a[1]=a[2]:
  print('Yes')  
else:
  print('No')
Problem p03041 (python)

Fixed submission:
n,k=map(int,input().split())
s=input()
if s[k-1]=='A':
  s=s[:k-1]+'a'+s[k:]
elif s[k-1]=='B':
  s=s[:k-1]+'b'+s[k:]
else:
  s=s[:k-1]+'c'+s[k:]
print(s)

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
s=input()
if s[k-1]==A:
  s=s[:k-1]+'a'+s[k:]
elif s[k-1]==B:
  s=s[:k-1]+'b'+s[k:]
else:
  s=s[:k-1]+'c'+s[k:]
print(s)
Problem p03075 (python)

Fixed submission:
a=[int(input()) for i in range(5)]
b=int(input())
if a[4]-a[0]<=b:
  print('Yay!')
else:
  print(':(')

Buggy submission (verdict: Runtime Error):
a=list[int(input()) for i in range(5)]
b=int(input())
if a[4]-a[0]>b:
  print('Yay!')
else:
  print(':(')
Problem p03250 (python)

Fixed submission:
a,b,c=map(int,input().split())
print(a+b+c+max(a,b,c)*9)

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
print(max(a,b,c)*10 + sorted(nums)[-2] + min(a,b,c))
Problem p02897 (python)

Fixed submission:
n = int(input())
if n % 2 == 0:
  p = (n/2)/n
  print(p)
else:
  p = (n/2+0.5)/n
  print(p)

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
h = list(map(int,input().split()))

ans = 0

for i in h:
    if i >= k:
        ans += 1

print(ans)
Problem p02829 (python)

Fixed submission:
A=input()
B=input()
ans_list=[1,2,3]
for ans in ans_list:
    if ans!=int(A) and ans !=int(B):
        print(ans)

Buggy submission (verdict: Runtime Error):
A=input()
B=input()
ans_list=[1,2,3]
for ans in ans_list:
  if ans!=A and ans!=B:
    return ans
Problem p02831 (python)

Fixed submission:
A,B = input().split()
A=int(A)
B =int(B)
if A<B:
  for i in range(1,B+1):
    if A*i%B ==0:
      print(A*i)
      break
else:
  for i in range(1,A+1):
    if B*i%A ==0:
      print(B*i)
      break

Buggy submission (verdict: Runtime Error):
A,B = input().split()

for i in range(1,B+1):
  if A*i%B==0:
    print(A*i)
Problem p02829 (python)

Fixed submission:
a1=int(input())
a2=int(input())
print(6-a1-a2)

Buggy submission (verdict: Runtime Error):
a1=input()
a2=input()
print(6-a1-a2)

Buggy submission (verdict: Runtime Error):
a1 = input()
a2 = input()

x = [1, 2, 3]

x = x.remove(a1)
x = x.remove(a2)

print(x)
Problem p02847 (python)

Fixed submission:
#入力
day = input()


if day == "MON":
  answer = 6
  
if day == "TUE":
  answer = 5
if day == "WED":
  answer = 4
if day == "THU":
  answer = 3
if day == "FRI":
  answer = 2
if day == "SAT":
  answer = 1
if day == "SUN":
  answer = 7

print(answer)

Buggy submission (verdict: Runtime Error):
#入力
day = input()


if day == "MON":
  answer = 6
  
if day == "TUE":
  answer = 5
if day == "WEN":
  answer = 4
if day == "TUR":
  answer = 3
if day == "FRY":
  answer = 2
if day == "SAT":
  answer = 1
if day == "SUN":
  answer = 7

print(answer)
Problem p02833 (python)

Fixed submission:
n=int(input())


def findTrailingZeros(n):
    # Initialize result
    count = 0

    i = 10

    while (i<=n):
        count+=n//i
        i *= 5

    return count


if n % 2 == 1:
    print(0)
else:
 get5s=findTrailingZeros(n)
 print(get5s)

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

if n%2==1:
    print(0)
    exit(0)
def findTrailingZeros(n):
    # Initialize result
    count = 0

    i = 10

    while (i<=n):
        count+=floor(n/i)
        i *= 5

    return count
get5s=findTrailingZeros(n)
print(get5s)
Problem p02836 (python)

Fixed submission:
import math
s=input()
S_list = [s[i: i+1] for i in range(0, len(s))]
sumup=0
if len(S_list)%2==0:
  for i in range(math.floor(len(S_list)/2)):
    if S_list[i]!=S_list[len(S_list)-i-1]:
      sumup+=1
  print(sumup)
else:
  for i in range(math.floor((len(S_list)-1)/2)):
    if S_list[i]!=S_list[len(S_list)-i-1]:
      sumup+=1
  print(sumup)

Buggy submission (verdict: Runtime Error):
import math
S=input()
S_list=[*S]
sumup=0
print(len(S_list))
if len(S_list)%2==0:
  for i in range(math.floor(len(S_list)/2)):
    if S_list[i]!=S_list[len(S_list)-i-1]:
      sumup+=1
  print(sumup)
else:
  for i in range(math.floor((len(S_list)-1)/2)):
    if S_list[i]!=S_list[len(S_list)-i-1]:
      sumup+=1
  print(sumup)
Problem p02847 (python)

Fixed submission:
S=input()
S_dic={"SUN":0,"MON":1,"TUE":2,"WED":3,"THU":4,"FRI":5,"SAT":6}
print(7-S_dic[S])

Buggy submission (verdict: Runtime Error):
S=input()
S_dic={"sun":7,"MON":1,"TUE":2,"WED":3,"THU":4,"FRI":5,"SAT":6}
print(7-S_dic[S])
Problem p02831 (python)

Fixed submission:
import fractions

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

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

print(lcm(a, b))

Buggy 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))
Problem p02833 (python)

Fixed submission:
N = int(input())

if N % 2 == 1:
    ans = 0
else:
    N = N//2
    ans = 0
    while N != 0:
        ans += N // 5
        N = N // 5
        
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())

if N % 2 == 1:
    print(0)
else:
    N = N//2
    ans = 0
    while N != 0:
        ans += N // 5
        N = N // 5
        
print(ans)