Harryxun/testdata huggingface dataset:
Buggy python 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
    


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

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

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

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

Fixed submission:
a, b = map(int, input().split())
if a * b % 2 == 0:
  print('Even')
else:
  print('Odd')
Buggy python 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
    


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 python 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
    

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 python 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')

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 python 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

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

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

if x <= y:
  print(x)
else:
  print(x-1)
Buggy python submission (verdict: Time Limit Exceeded):
values = raw_input()
n,x = int(values.split(" ")[0]), int(values.split(" ")[1])
cities = raw_input()
cities = [int(i) for i in cities.split(" ")]

distances = []
for i in cities:
	distances.append(abs(i-x))
m = max(distances)

D = m
while(D<=m):
	pos = x
	flag = True
	for i in range(len(cities)):
		if cities[i]<pos:
			k = (cities[i]-pos)/float(-D)
		else:
			k = (cities[i]-pos)/float(D)
		if k!=int(k):
			flag = False
		pos = cities[i]
		#print("\t",k, pos)

	if flag == True:
		print(D)
		break
	D -= 1

Fixed submission:
values = raw_input()
n,x = int(values.split(" ")[0]), int(values.split(" ")[1])
cities = raw_input()
cities = [int(i) for i in cities.split(" ")]

cities = sorted(cities)

distances = []
for i in cities:
	distances.append(abs(i-x))
for i in range(1,len(cities)):
	distances.append(abs(cities[i]-cities[i-1]))

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

m = distances[0]
for i in range(1,len(distances)):
	m = hcd(m, distances[i])
print(m)
Buggy python 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)

Fixed submission:
a,b = map(int, input().split())
if a * b % 2 == 0 : print("No")
else : print("Yes")
Buggy python 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)

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


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


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


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 python submission (verdict: Time Limit Exceeded):
# coding: utf-8

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

count = 0

for begin in range(n):
    for end in range(begin+1, n+1):
        if sum(a[begin:end]) % m == 0:
            count += 1

print(count)


Fixed submission:
# coding: utf-8


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

    d = {0: 1}

    a_sum = 0
    for i in range(n):
        a_sum += a[i]
        d[a_sum % m] = d.get(a_sum % m, 0) + 1

    answer = 0
    for count in d.values():
        answer += count * (count - 1) / 2

    print(int(answer))


if __name__ == '__main__':
    main()
Buggy python 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)


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 python submission (verdict: Runtime Error):
import sys
list(map(lambda n: print(int(n[0]) * int(n[1]) / 2, map(str.split, sys.stdin)))

Fixed submission:
import sys
 
for line in sys.stdin:
  nbs = line.split(' ')
  print(int(nbs[0]) * int(nbs[1]) // 2)
Buggy python 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()))

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

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 python submission (verdict: Time Limit Exceeded):
import re
import sys

line = next(sys.stdin).strip()

count = 0
to_add = len(re.findall('BW', line))
while to_add:
    count += to_add
    line = line.replace('BW', 'WB')
    to_add = len(re.findall('BW', line))

print(count)


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 python 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__':
    main(map(int, sys.stdin))

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

answer = 0
count = {}

for nb in nbs:
    count[nb] = count.get(nb, 0) + 1

for nb in sorted(count.keys(), reverse=True):
    searching = (1 << nb.bit_length()) - nb
    nb_count = count[nb]
    sr_count = count.get(searching, 0)
    if sr_count:
        if nb == searching:
            increment = nb_count // 2
        else:
            increment = nb_count if nb_count < sr_count else sr_count
            count[searching] -= increment
        answer += increment

print(answer)

Buggy python submission (verdict: Time Limit Exceeded):
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)

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

answer = 0
count = {}

for nb in nbs:
    count[nb] = count.get(nb, 0) + 1

for nb in sorted(count.keys(), reverse=True):
    searching = (1 << nb.bit_length()) - nb
    nb_count = count[nb]
    sr_count = count.get(searching, 0)
    if sr_count:
        if nb == searching:
            increment = nb_count // 2
        else:
            increment = nb_count if nb_count < sr_count else sr_count
            count[searching] -= increment
        answer += increment

print(answer)
Buggy python 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)

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

Buggy python 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)

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

Buggy python 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)

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

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

Fixed submission:
a=list(map(int,input().split()))
print('{:.0f}'.format(a[0]*a[1]/2))
Buggy python 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)

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 python submission (verdict: Runtime Error):
import sqrt
a, b = input().split()
if sqrt(int(a+b)) % 1 == 0:
  print("Yes")
else:
  print("No")

Fixed submission:
from math import sqrt
a, b = input().split()
if sqrt(int(a+b)) % 1 == 0:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
N = int(input())
p = int([input() for i in range(N)])
max=100

for i in range(N):
    if p(i) > max:
        max=p(i)
        m=i

p(m) = p(m)/2

for i in range(N):
    A += p(i)

print(A)  

Fixed submission:
N = int(input())
p = [int(input()) for i in range(N)]
A = 0
max=99

for i in range(N):
    if p[i] > max:
        max = p[i]
        m = i

p[m] = p[m]/2


for i in range(N):
    A += p[i]

print(int(A))
Buggy python 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)

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

print(int(x + y/2))

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

print(x + y/2)

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

print(int(x + y/2))

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

print(X + Y/2)

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

print(int(x + y/2))
Buggy python 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)

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

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 python 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])

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 python submission (verdict: Runtime Error):
import re
x = input()
vowels = 'aiueo'
index = vowels.search(x)
if index != -1:
    print("vowel")
else:
    print("consonant")


Fixed submission:
x = input()
vowels = 'aiueo'
index = vowels.find(x)
if index != -1:
    print("vowel")
else:
    print("consonant")
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
h = int(input())

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


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

print(int((a + b) * h / 2))
Buggy python 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")


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

Buggy python 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")


Fixed submission:
x = list(map(int, input().split()))
if x.count(5) == 2 and x.count(7) == 1:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
n=input()
p={}
for i in range(n):
    p.append(i)=input()

for i in range(n):
    if p[i]==max(p):
        p[i]=max(p)/2

print(int(sum(p)))


Fixed submission:
n=int(input())
p=[]
for i in range(n):
    p.append(int(input()))

m=max(p)
for i in range(n):
    if p[i]==m:
        p[i]=int(m)/2
        break

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

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

Fixed submission:
a,b = map(int, input().split())
 
if (a * b) % 2:
  print("Odd")
else:
  print("Even")
Buggy python submission (verdict: Runtime Error):
K = input()
k=K.split('\n')
N,M,X=map(int, k[0].split())
A = [i for i in map(int, k[1].split())]
squares=[i for i in range(N+1)]



V=squares[X]
lowest=[]
highest =[]
for i in range(len(A)):
    if A[i]<V:
        lowest.append(A[i])
    else:
        highest.append(A[i])

if len(lowest)>len(highest):
    cost = len(highest)
else:
    cost = len(lowest)

print(cost)
       

Fixed submission:

N, M, X = map(int, input().split())

A = [i for i in map(int, input().split())]
squares=[i for i in range(N+1)]
V=squares[X]
lowest=[]
highest =[]
for i in range(len(A)):
    if A[i]<V:
        lowest.append(A[i])
    else:
        highest.append(A[i])
if len(lowest)>len(highest):
    cost = len(highest)
else:
    cost = len(lowest)

print(cost)
Buggy python submission (verdict: Runtime Error):
s=int(raw_input())
f=lambda x:(x/2)*(x%2==0)+(3*x+1)*(x%2==1)
r=[s]
map(lambda x:r.append(f(r[-1])),xrange(1,100000))
for i in xrange(1,100000):
  try:
    s=r[i+1:].index(r[i])
    rs=i+4
    break
  except:
    pass
print rs


Fixed submission:
print (lambda x:(x[0]*x[1])/2)(map(int,raw_input().split(" ")))

Buggy python submission (verdict: Runtime Error):
import sys
def main(a,b,c):
  return (a*b)/2

if __name__=="__main__":
  main(sys.argv[1],sys.argv[2],sys.argv[3])

Fixed submission:
print (lambda x:(x[0]*x[1])/2)(map(int,raw_input().split(" ")))

Buggy python submission (verdict: Runtime Error):
A, B, C = map(int, input().split)

#X = A * B / 2
# 商の整数値（小数点以下を切り捨て）
X = A * B // 2
print(X)

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

#X = A * B / 2
# 商の整数値（小数点以下を切り捨て）
X = A * B // 2
print(X)

Buggy python submission (verdict: Runtime Error):
A, B, C = map(int, input().split)

X = A * B / 2
print(X)

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

#X = A * B / 2
# 商の整数値（小数点以下を切り捨て）
X = A * B // 2
print(X)
Buggy python submission (verdict: Runtime Error):
def f(n):
  if N%2 == 0:
    return n //2
  return 3*n+1

s = int(input())
ans = 1
used = set()
while True:
  if s in used:
    break
  used.add(s)
  ans += 1
  s = f(s)
print(ans)

Fixed submission:
def f(n):
    if n%2 == 0:
        return n //2
    return 3*n+1

s = int(input())
ans = 1
used = set()
# 同じものがでるまで処理を繰り返す
while True:
    if s in used:
        break
    used.add(s)
    ans += 1
    s = f(s)
print(ans)
Buggy python submission (verdict: Runtime Error):
a,b,c = map(int(),input().split())
res = a * b / 2
print(res)

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