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

Fixed submission:
import fractions
n = int(input())
t = [int(input()) for i in range(n)]
def lcm(x, y):
    return (x * y) //fractions.gcd(x, y)
l = t[0]
for x in range(n):
    l = lcm(l,t[x])
print(l)

Buggy submission (verdict: Runtime Error):
import math
n = int(input())
t = [int(input()) for i in range(n)]
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
l = t[0]
for x in range(n):
    l = lcm(l,t[x])
print(l)
Problem p03408 (python)

Fixed submission:
n=[input() for _ in range(int(input()))]
m=[input() for _ in range(int(input()))]
l=list(set(n))
print(max(0,max(n.count(l[i])-m.count(l[i]) for i in range(len(l)))))

Buggy submission (verdict: Runtime Error):
n=[input() for _ in range(int(input()))]
m=[input() for _ in range(int(input()))]
l=list(set(n))
print(max(0 ,max(n.count(l[i])-m.count(l[i]) for i in range(l))))

Buggy submission (verdict: Runtime Error):
n=[input() for _ in range(int(input()))]
m=[input() for _ in range(int(input()))]
l=list(set(n))
print(max(0,n.count(l[i])-m.count(l[i]) for i in range(l)))

Buggy submission (verdict: Runtime Error):
n=[input() for _ in range(int(input()))]
m=[input() for _ in range(int(input()))]
l=list(set(n))
print(max(0,n.count(l[i])-m.count(l[i])) for i in range(l))

Buggy submission (verdict: Runtime Error):
n=[input() for _ in range(int(input()))]
m=[input() for _ in range(int(input()))]
l=set(n)
print(max(0,n.count(l[i])-m.count(l[i])) for i in range(l))
Problem p03416 (python)

Fixed submission:
a,b=map(int,input().split())
print(sum(i==i[::-1] for i in map(str,range(a,b+1))))

Buggy submission (verdict: Runtime Error):
a,b=map(int,input())
print(sum(i==i[::-1] for i in map(str,range(a,b+1))))

Buggy submission (verdict: Runtime Error):
a,b=map(int,input())
print(sum(i=i[::-1] for i in map(str,range(a,b+1))))
Problem p03470 (python)

Fixed submission:
print(len(set([int(input()) for _ in range(int(input()))])))

Buggy submission (verdict: Runtime Error):
print(len(set([int(input()) for _ in range(input())])))

Buggy submission (verdict: Runtime Error):
print(len(set([int(input()) for _　in range(input())])))

Buggy submission (verdict: Runtime Error):
print(len(set([int(input()) for _　in range(input())])))

Buggy submission (verdict: Runtime Error):
len(set([int(input()) for _　in range(input())]))
Problem p03796 (python)

Fixed submission:
import math
print(math.factorial(int(input()))%(10**9+7))

Buggy submission (verdict: Runtime Error):
import math
print(math.factrial(int(input()))%(10**9+7))

Buggy submission (verdict: Runtime Error):
import math
print(math.factrial(int(input()))//(10**9+7))
Problem p03447 (python)

Fixed submission:
X = int(input())
A = int(input())
B = int(input())
r = X - A - B * ((X - A) // B)
print(r)

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())
X = int(input())
cnt = 0

for a in range(A + 1):
  for b in range(B + 1):
    for c in range(C + 1):
      if 500 * a + 100 * b + 50 * c == X:
        cnt += 1
        
print(cnt)
Problem p03455 (python)

Fixed submission:
a, b = map(int, input().split())
if a * b % 2 == 0:
  print('Even')
else:
  print('Odd')

Buggy submission (verdict: Runtime Error):
N = int(input())
t_old, x_old, y_old = 0, 0, 0

for i in range(N):
  t, x, y = map(int, input().split())
  dt = t - t_old
  dx = x - x_old
  dy = y - y_old
  t_old = t
  x_old = x
  y_old = y
  if abs(dx) + abs(dy) =< dt and (dt - (abs(dx) + abs(dy))) % 2 == 0:
    if i == N - 1:
      print('Yes')
  else:
    print('No')
    break

Buggy submission (verdict: Runtime Error):
if int(a) % 2 == 0 or int(b) % 2 == 0:
  print('Even')
else:
  print('Odd')

Buggy submission (verdict: Runtime Error):
if a % 2 == 0 or b % 2 == 0:
  print('Even')
else:
  print('Odd')
Problem p03457 (python)

Fixed submission:
N = int(input())
t_old, x_old, y_old = 0, 0, 0

for i in range(N):
  t, x, y = map(int, input().split())
  dt = t - t_old
  dx = x - x_old
  dy = y - y_old
  t_old = t
  x_old = x
  y_old = y
  if abs(dx) + abs(dy) <= dt and (dt - (abs(dx) + abs(dy))) % 2 == 0:
    if i == N - 1:
      print('Yes')
    pass
  else:
    print('No')
    break

Buggy submission (verdict: Runtime Error):
N = int(input())
t_old, x_old, y_old = 0, 0, 0

for i in range(N):
  t, x, y = map(int, input().split())
  dt = t - t_old
  dx = x - x_old
  dy = y - y_old
  t_old = t
  x_old = x
  y_old = y
  if abs(dx) + abs(dy) =< dt and (dt - (abs(dx) + abs(dy))) % 2 == 0:
    if i == N - 1:
      print('Yes')
    pass
  else:
    print('No')
    break

Buggy submission (verdict: Runtime Error):
N = int(input())
t_old, x_old, y_old = 0

for i in range(N):
  t, x, y = map(int, input().split())
  dt = t - t_old
  dx = x - x_old
  dy = y - y_old
  t_old = t
  x_old = x
  y_old = y
  if abs(dx) + abs(dy) =< dt and (dt - (abs(dx) + abs(dy))) % 2 == 0:
    if i == N - 1:
      print('Yes')
  else:
    print('No')
    break
Problem p03471 (python)

Fixed submission:
N, Y = map(int, input().split())
flag = 0
for x in range(N + 1):
  if flag == 1:
    break
  for y in range(N + 1 - x):
    if flag == 1:
      break
    z = N - x - y
    if 10000 * x + 5000 * y + 1000 * z == Y:
      flag = 1
      print(str(x) + ' ' + str(y) + ' ' + str(z))

#出力は１つだけで良い！
if flag == 0:
  print('-1 -1 -1')

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())
flag = 0
for x in range(N + 1):
  for y in range(N + 1 - x):
    z = N - x - y
    if 10000 * x + 5000 * y + 1000 * z == Y:
      flag = 1
      print(f'{x} {y} {z}')
if flag == 0:
  print('-1 -1 -1')
Problem p03854 (python)

Fixed submission:
S = input()
words = ['dream', 'dreamer', 'erase', 'eraser']
while len(S) > 0:
  judge = [S.endswith(w) for w in words]
  # 逆から考えることで単語の重複をなくすのがポイント！
  if any(judge):
    hit_word = words[judge.index(True)]
    S = S[:-len(hit_word)]
    if len(S) == 0:
      print('YES')
      break
  else:
    print('NO')
    break

Buggy submission (verdict: Runtime Error):
S = input()
words = ['dream', 'dreamer', 'erase', 'eraser']
while len(S) > 0:
  judge = [S.endwith(w) for w in words]
  # 逆から考えることで単語の重複をなくすのがポイント！
  if any(judge):
    hit_word = words[judge.index(True)]
    S = S[:-len(hit_words)]
    if len(S) == 0:
      print('YES')
      break
  else:
    print('NO')
    break
Problem p03340 (python)

Fixed submission:
N = int(input())
A_raw = input()
A = [int(i) for i in A_raw.split(' ')]
cnt = 0
first = 0
xsum_old = 0
r_old = 0
for l in range(0, N):
    xsum = xsum_old
    first = A[l]
    cnt += r_old - l
    isBreak = False
    for r in range(r_old, N):
        if xsum & A[r] > 0:
            xsum_old = xsum - first
            r_old = r
            isBreak = True
            break
        xsum += A[r]
        cnt += 1
    if isBreak == False:
        r_old = r
print(cnt)

Buggy submission (verdict: Runtime Error):
N = input()
A_raw = input()
A = [int(i) for i in A_raw.split(' ')]
cnt = 0
first = 0
xsum_old = 0
r_old = 0
for l in range(0, N):
    xsum = xsum_old
    first = A[l]
    cnt += r_old - l
    print(cnt, l, r_old)
    for r in range(r_old, N):
        if xsum & A[r] > 0:
            xsum_old = xsum - first
            r_old = r
            break
        xsum += A[r]
        cnt += 1
print(cnt)
Problem p03359 (python)

Fixed submission:
x, y = map(int, input().split())

if x <= y:
  print(x)
else:
  print(x-1)

Buggy submission (verdict: Runtime Error):
x, y = map(int, input().split())
 
cnt = 0
for i in range(1, 13):
    for j in range(1, 13):
        if x == i and y >== j:
            cnt += 1
print(cnt)
Problem p03260 (python)

Fixed submission:
a,b = map(int, input().split())
if a * b % 2 == 0 : print("No")
else : print("Yes")

Buggy submission (verdict: Runtime Error):
n,x = map(int, input().split())
l = [ abs(i - x) for i in list(map(int, input().split()))]
l.sort(reverse=True)
if len(l) == 1:ans = l[0]
else:
  while len(l) != 1:
    l = list(set(l))
    l = [ l[i] - l[i+1] for i in range(len(l) - 1)]
  ans = l[0]
print(ans)
Problem p03262 (python)

Fixed submission:
n,x = map(int, input().split())
l = [ abs(i - x) for i in list(map(int, input().split()))]
l.sort(reverse=True)
l = list(set(l))
if len(l) == 1:ans = l[0]
else:
  while len(l) != 1:
    l.sort(reverse=True)
    l.append(0)
    l = [ l[i] - l[i+1] for i in range(len(l) - 1)]
    l = list(set(l))
    for i in l:
      if i % min(l) != 0:break
    else:
      l[0] = min(l)
      break
  ans = l[0]
print(ans)

Buggy submission (verdict: Runtime Error):
n,x = map(int, input().split())
l = [ abs(i - x) for i in list(map(int, input().split()))]
l.sort(reverse=True)
if len(l) == 1:ans = l[0]
else:
  while len(l) != 1:
    l.sort(reverse=True)
    if 0 not in l: l.append(0)
    l = [ l[i] - l[i+1] for i in range(len(l) - 1)]
    l = list(set(l))
    for i in l:
      if i % min(l) != 0:break
    else:
      l[0] = min(l)
      break
  ans = l[0]
print(ans)

Buggy submission (verdict: Runtime Error):
n,x = map(int, input().split())
l = [ abs(i - x) for i in list(map(int, input().split()))]
l.sort(reverse=True)
if len(l) == 1:ans = l[0]
else:
  while len(l) != 1:
    l.sort(reverse=True)
    l.append(0)
    l = [ l[i] - l[i+1] for i in range(len(l) - 1)]
    l = list(set(l))
    for i in l:
      if i % min(l) != 0:break
    else:
      l[0] = min(l)
      break
  ans = l[0]
print(ans)
Problem p03145 (python)

Fixed submission:
sides = raw_input()
sides = [int(i) for i in sides.split(" ")]
m = max(sides)
sides = [i for i in sides if i!=m]
print(sides[0]*sides[1]/2)

Buggy submission (verdict: Runtime Error):
sides = raw_input()
sides = [int(i) for i in sides]
m = max(sides)
sides = [i for i in sides if i!=m]
print(sides[0]*sides[1]/2)
Problem p03240 (python)

Fixed submission:
# coding: utf-8


def main():
    n = int(input())

    coordinates = []
    for _ in range(n):
        coordinates.append(list(map(int, input().split())))

    for coordinate in coordinates:
        if coordinate[2] > 0:
            xx = coordinate[0]
            yy = coordinate[1]
            hh = coordinate[2]
            break

    for px in range(101):
        for py in range(101):
            ph = hh + abs(xx - px) + abs(yy - py)

            suit = True
            for x, y, h in coordinates:
                if h != max(ph - abs(x - px) - abs(y - py), 0):
                    suit = False
                    break

            if suit == True:
                print(px, py, ph)
                return


if __name__ == '__main__':
    main()

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


def main():
    n = int(input())

    coordinates = []
    for _ in range(n):
        coordinates.append(list(map(int, input().split())))

    for coordinate in coordinates:
        if coordinate[2] > 0:
            xx = coordinate[0][0]
            yy = coordinate[0][1]
            hh = coordinate[0][2]
            break

    for px in range(101):
        for py in range(101):
            ph = hh + abs(xx - px) + abs(yy - py)

            if ph <= 0:
                continue

            suit = True
            for coordinate in coordinates:
                if coordinate[2] != ph - abs(coordinate[0] - px) - abs(coordinate[1] - py):
                    suit = False
                    break

            if suit == True:
                print(px, py, ph)
                return


if __name__ == '__main__':
    main()

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


def main():
    n = int(input())

    coordinate = []
    for _ in range(n):
        coordinate.append(list(map(int, input().split())))

    for co in coordinate:
        if coordinate[0][2] > 0:
            xx = coordinate[0][0]
            yy = coordinate[0][1]
            hh = coordinate[0][2]

    for px in range(101):
        for py in range(101):
            ph = hh + abs(xx - px) + abs(yy - py)

            if ph <= 0:
                continue

            suit = True
            for co in coordinate:
                if co[2] != ph - abs(co[0] - px) - abs(co[1] - py):
                    suit = False
                    break

            if suit == True:
                print(px, py, ph)
                return


if __name__ == '__main__':
    main()
Problem p03244 (python)

Fixed submission:
# coding:utf-8
import collections


def main():
    n = int(input())
    v = list(map(int, input().split()))

    va = []
    vb = []
    for i in range(0, n, 2):
        va.append(v[i])
        vb.append(v[i + 1])

    if va == vb and len(set(va)) == 1:
        print(len(va))
        return

    c1mc = collections.Counter(va).most_common()
    c2mc = collections.Counter(vb).most_common()

    if c1mc[0][0] != c2mc[0][0]:
        print(n - c1mc[0][1] - c2mc[0][1])
        return

    else:
        a = n - c1mc[1][1] - c2mc[0][1]
        b = n - c1mc[0][1] - c2mc[1][1]

        if a < b:
            print(a)
        else:
            print(b)


if __name__ == "__main__":
    main()

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


def main():
    n = int(input())
    v = list(map(int, input().split()))

    va = []
    vb = []
    for i in range(0, n, 2):
        va.append(v[i])
        vb.append(v[i + 1])

    c1mc = collections.Counter(va).most_common()
    c2mc = collections.Counter(vb).most_common()

    if c1mc[0][0] != c2mc[0][0]:
        print(n - c1mc[0][1] - c2mc[0][1])
        return

    else:
        a = n - c1mc[1][1] - c2mc[0][1]
        b = n - c1mc[0][1] - c2mc[1][1]

        if a < b:
            print(a)
        else:
            print(b)


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

Fixed submission:
# coding: utf-8

from functools import reduce


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


def gcd_list(numbers):
    return reduce(gcd, numbers)


def main():
    n, x = map(int, input().split())
    xi = map(int, input().split())

    diffs = []
    for i in xi:
        diffs.append(abs(x - i))

    print(gcd_list(diffs))


if __name__ == '__main__':
    main()

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

import math
from functools import reduce


def gcd_list(numbers):
    return reduce(math.gcd, numbers)


def main():
    n, x = map(int, input().split())
    xi = map(int, input().split())

    diffs = []
    for i in xi:
        diffs.append(abs(x - i))

    print(gcd_list(diffs))


if __name__ == '__main__':
    main()

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


def main():
    n, x = map(int, input().split())
    xi = map(int, input().split())

    diffs = []
    for i in xi:
        diffs.append(abs(x - i))

    for diff in diffs:
        if diff % min(diffs)) != 0:
            print('1')
            return

    print(min(diffs))


if __name__ == '__main__':
    main()
Problem p03323 (python)

Fixed submission:
# coding:utf-8

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

if a >= 1 and a <= 8 and b >= 1 and b <= 8:
    print("Yay!")
else:
    print(":(")

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

n, m = map(int,input("").split())

cakes = []
for i in range(n):
    cakes.append(input().split())

maxsum = 0
for kumiawase in itertools.combinations(cakes, m):
    x = y = z = 0
    for cake in kumiawase:
        x += int(cake[0])
        y += int(cake[1])
        z += int(cake[2])
    statussum = abs(x) + abs(y) + abs(z)
    if statussum > maxsum:
        maxsum = statussum
print(maxsum)
Problem p03145 (python)

Fixed submission:
import sys
 
for line in sys.stdin:
  nbs = line.split(' ')
  print(int(nbs[0]) * int(nbs[1]) // 2)

Buggy submission (verdict: Runtime Error):
import sys
list(map(lambda n: print(int(n[0]) * int(n[1]) / 2, map(str.split, sys.stdin)))
Problem p03200 (python)

Fixed submission:
import re
import sys

line = next(map(str.strip, sys.stdin))

count = 0
nb_bs = 0
for i, c in enumerate(line):
    if c == 'W' and nb_bs > 0:
        count += nb_bs
    elif c == 'B':
        nb_bs += 1

print(count)

Buggy submission (verdict: Runtime Error):
import sys

def main(l):
    u = set()
    l = list(sorted(l))
    for i, a in enumerate(reversed(l)):
        searching = (1 << a.bit_length()) - a
        for j, b in enumerate(l[:-i-1]):
            if b == searching and not j in u:
                u.add(j)
                break

    return len(u)


if __name__ == '__main__':
    input()
    main(map(int, input()))

Buggy submission (verdict: Runtime Error):
import sys

nbs = list(sorted(map(int, list(sys.stdin)[1].strip().split())))
used = set()
count = 0

for k in reversed(range(1, 31)):
    p = 1 << k
    j = len(nbs) - 1
    for i, a in enumerate(nbs):
        if i not in used:
            while j > i and (nbs[j] > p - a or j in used):
                j -= 1
            if j <= i:
                break
            if nbs[j] == p - a:
                used.add(i)
                used.add(j)
                count += 1

print(count)
Problem p03145 (python)

Fixed submission:
a=list(map(int,input().split()))
print('{:.0f}'.format(a[0]*a[1]/2))

Buggy submission (verdict: Runtime Error):
colatz=[1,2,4]
colatz.append(int(input()))
if colatz[3]==1 or 2 or 4:
    print(4)
else:
    b=3
    while colatz[b]!=4:
        if colatz[b]%2==0:
            colatz.append(colatz[b]/2)
        else: colatz.append(3*colatz[b]+1)
        b=b+1
    print(b+1)

Buggy submission (verdict: Runtime Error):
colatz=[1,2,4]
colatz.append(int(input()))
if colatz[3]==1 or 2 or 4:
    print(4)
else:
    b=3
    while colatz[b]!=4:
        if colatz[b]%2==0:
            colatz.append(colatz[b]/2)
        else: colatz.append(3*colatz[b]+1)
        b=b+1
    print(b+1)

Buggy submission (verdict: Runtime Error):
colatz=[1,2,4]
colatz.append(int(input()))
b=3
while colatz[b]!=colatz[b-3]:
    if colatz[b]%2==0:
        colatz.append(colatz[b]/2)
    else: colatz.append(3*colatz[b]+1)
    b=b+1
print(b+1)

Buggy submission (verdict: Runtime Error):
a=list(map(int,input().split()))
print(a0*a1/2)
Problem p03146 (python)

Fixed submission:
colatz=[1,2,4]
colatz.append(int(input()))
if colatz[3]==1 or colatz[3]==2 or colatz[3]==4:
    print(4)
else:
    b=3
    while colatz[b]!=4:
        if colatz[b]%2==0:
            colatz.append(colatz[b]/2)
        else: colatz.append(3*colatz[b]+1)
        b=b+1
    print(b+1)

Buggy submission (verdict: Runtime Error):
colatz=1,2,4
colatz.append(list(map(int,input().split())))
b=3
while colatz[b]!=colatz[b-3]:
    if colatz[b]%2==0:
        colatz.append(colatz[b]/2)
    else: colatz.append(3*colatz[b]+1)
    b=b+1
print(b)
Problem p03455 (python)

Fixed submission:
a,b=map(int,input().split())
if (a)%2 == 0:
  print("Even")
elif (b)%2 == 0:
	print("Even")
else:
  print("Odd")

Buggy submission (verdict: Runtime Error):
n = int(input())
t = []
x = []
y = []
for i in range(n):
    ti, xi, yi = map(int,input().split())
    t.append(ti)
    x.append(xi)
    y.append(yi)
    if ((x[i]+y[i])%2==0 and t[i]%2==1 or (x[i]+y[i])%2==1 and t[i]%2==0 or x[i]+y[i]>t[i]):
        print("No")
        exit()
print("Yes")

Buggy submission (verdict: Runtime Error):
import math import sqrt
a, b = input().split()
if sqrt(int(a+b)) % 1 == 0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
import math
a, b = input().split()
if sqrt(int(a+b)) % 1 == 0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if (a)%2 == 0:
        print("Even")
     else:
        print("Odd")

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a%2==0:print("Even")
  elif b%2==0:print("Even")
    else:print("Odd")

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a%2==2:print("Even")
  elif b%2==2:print("Even")
    else:print("Odd")

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a%2==0:print("Even")
  elif b%2==0:print("Even")
    else:print("Odd")

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a%2==0:print("Even")
  elif b%2==0:print("Even")
    else print("Odd")

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a%2==0:print("Even")
  elif b%2==0:print("Even")
    elif print("Odd")

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
if a%2=0:print("Even")
  elif b%2=0:print("Even")
    elif print("Odd")

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a%2=0:print("Even")
  elif b%2=0:print("Even")
    elif print("Odd")
Problem p03456 (python)

Fixed submission:
from math import sqrt
a, b = input().split()
if sqrt(int(a+b)) % 1 == 0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
import sqrt
a, b = input().split()
if sqrt(int(a+b)) % 1 == 0:
  print("Yes")
else:
  print("No")
Problem p03219 (python)

Fixed submission:
x, y = tuple(map(int, input().split()))

print(int(x + y/2))

Buggy submission (verdict: Runtime Error):
n = int(input())
t, a = tuple(map(int, input().split()))
h = list(map(int, input().split()))
mine = 1000
mini = 0
d=[0 for i in range(n)]
def tmp(x):
    return t - 0.006*x

for i in range(n):
    d[i] = abs( a - tmp(h[i]) )
    if mine > d[i]:
        mine = d[i]
        mini = i

print(mini+1)

Buggy submission (verdict: Runtime Error):
x = int(input())
y = int(input())

print(x + y/2)

Buggy submission (verdict: Runtime Error):
X = int(input())
Y = int(input())

print(X + Y/2)
Problem p03146 (python)

Fixed submission:
def f(x):
	if x % 2 == 0:
		return x//2
	else:
		return 3*x+1
 
s = int(input())
a = [s]
m = 1
while True:
	t = f(s)
	m += 1
	if t not in a:
		a.append(t)
		s = t
	else:
		break
print(m)

Buggy submission (verdict: Runtime Error):
def f(x):
	if x % 2 == 0:
    	return x//2
	else:
		return 3*x+1

s = int(input())
a = [s]
m = 1
while True:
	t = f(s)
    m += 1
    if t not in a:
    	a.append(t)
        s = t
	else:
    	break
print(m)

Buggy submission (verdict: Runtime Error):
def f(x):
  if x % 2 == 0:
    return x//2
  else:
    return 3*x+1
  
s = int(input())
a = [s]
m = 1
while True:
	t = f(s)
    m += 1
	if t not in a:
      a.append(t)
      s = t
    else:
      break
print(m)
Problem p03573 (python)

Fixed submission:
ary =list( map(int, input().split()))
if ary[0] == ary[1]:
    print(ary[2])
elif ary[0] == ary[2]:
    print(ary[1])
else:
    print(ary[0])

Buggy submission (verdict: Runtime Error):
ary = map(int, input().split())
if ary[0] == ary[1]:
    print(ary[2])
elif ary[0] == ary[2]:
    print(ary[1])
else:
    print(ary[0])
Problem p03852 (python)

Fixed submission:
x = input()
vowels = 'aiueo'
index = vowels.find(x)
if index != -1:
    print("vowel")
else:
    print("consonant")

Buggy submission (verdict: Runtime Error):
import re
x = input()
vowels = 'aiueo'
index = vowels.search(x)
if index != -1:
    print("vowel")
else:
    print("consonant")
Problem p03997 (python)

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

print(int((a + b) * h / 2))

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

print((a + b) * h / 2))
Problem p04043 (python)

Fixed submission:
x = list(map(int, input().split()))
if x.count(5) == 2 and x.count(7) == 1:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
x = list(map(int, input().split()))
if x.count[5] == 2 and x.count[7] == 1:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
x = lsit(map(int, input().split()))
if x.count[5] == 2 and x.count[7] == 1:
    print("YES")
else:
    print("NO")
Problem p03455 (python)

Fixed submission:
a,b = map(int, input().split())
 
if (a * b) % 2:
  print("Odd")
else:
  print("Even")

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

if a * b % == 0:
  print(Odd)
else:
  print(Even)