Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
s1 = raw_input()
s2 = raw_input()
s2 = s2.split(" ")
f = 0
for a,b in enumerate(s2):
    if str(s2[int(b)-1]) == str(a+1):
        f = f+1
print f/2

Fixed submission:
s1 = input()
s2 = input()
s2 = s2.split(" ")
f = 0
for a,b in enumerate(s2):
    if str(s2[int(b)-1]) == str(a+1):
        f = f+1
print (int(f/2))

Buggy python submission (verdict: Runtime Error):
s1 = raw_input()
s2 = raw_input()
s2 = s2.split(" ")
f = 0
for a,b in enumerate(s2):
    if str(s2[int(b)-1]) == str(a+1):
        f = f+1
print str(f/2)

Fixed submission:
s1 = input()
s2 = input()
s2 = s2.split(" ")
f = 0
for a,b in enumerate(s2):
    if str(s2[int(b)-1]) == str(a+1):
        f = f+1
print (int(f/2))

Buggy python submission (verdict: Runtime Error):
s1 = raw_input()
s2 = raw_input()
s2 = s2.split(" ")
f = 0
for a,b in enumerate(s2):
    if str(s2[int(b)-1]) == str(a+1):
        f = f+1
print f/2

Fixed submission:
s1 = input()
s2 = input()
s2 = s2.split(" ")
f = 0
for a,b in enumerate(s2):
    if str(s2[int(b)-1]) == str(a+1):
        f = f+1
print (int(f/2))

Buggy python submission (verdict: Runtime Error):
s1 = raw_input()
s2 = raw_input()
s2 = s2.split(" ")
f = 0
print s2
for a,b in enumerate(s2):
    if str(s2[int(b)-1]) == str(a+1):
        f = f+1
print f/2

Fixed submission:
s1 = input()
s2 = input()
s2 = s2.split(" ")
f = 0
for a,b in enumerate(s2):
    if str(s2[int(b)-1]) == str(a+1):
        f = f+1
print (int(f/2))

Buggy python submission (verdict: Runtime Error):
s1 = raw_input()
s2 = raw_input()
s2 = s2.split(" ")
f = 0
for a,b in enumerate(s2):
    if s2[int(b)] == str(a):
        f++
print f

Fixed submission:
s1 = input()
s2 = input()
s2 = s2.split(" ")
f = 0
for a,b in enumerate(s2):
    if str(s2[int(b)-1]) == str(a+1):
        f = f+1
print (int(f/2))

Buggy python submission (verdict: Runtime Error):
s1 = raw_input()
s2 = raw_input()
s2 = s2.split(" ")
f = 0
for a,b in enumerate(s2):
    if s2[b] == str(a):
        f++
print f

Fixed submission:
s1 = input()
s2 = input()
s2 = s2.split(" ")
f = 0
for a,b in enumerate(s2):
    if str(s2[int(b)-1]) == str(a+1):
        f = f+1
print (int(f/2))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(raw_input())
s = raw_input()
aa = s.split(" ")
aaa = []
for i in range(n):
	aaa.append((i+1,int(aa[i])))

ctr = 0

for (a,b) in aaa:
	if (b,a) in aaa:
		aaa.remove((a,b))
		aaa.remove((b,a))
		ctr = ctr + 1
# ctr = ctr / 2
print(str(ctr))

Fixed submission:
n = int(raw_input())
s = raw_input()
aa = s.split(" ")
aa = [int(x)-1 for x in aa]

ctr = 0

for i in range(n):
	if i == aa[aa[i]]:
		ctr = ctr + 1

ctr = ctr / 2

print(str(ctr))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(raw_input())
s = raw_input()
aa = s.split(" ")
aaa = []
for i in range(n):
	aaa.append((i+1,int(aa[i])))

ctr = 0

for (a,b) in aaa:
	if (b,a) in aaa:
		# aaa.remove((a,b))
		# aaa.remove((b,a))
		ctr = ctr + 1
ctr = ctr / 2
print(str(ctr))

Fixed submission:
n = int(raw_input())
s = raw_input()
aa = s.split(" ")
aa = [int(x)-1 for x in aa]

ctr = 0

for i in range(n):
	if i == aa[aa[i]]:
		ctr = ctr + 1

ctr = ctr / 2

print(str(ctr))
Buggy python submission (verdict: Runtime Error):
n = input()
s = list(input())
a = {}
for i in range(1,int(n)+1):
    a[i] = int(s[2*i-2])

result = 0
for i in range(1,int(n)+1):
    if a[a[i]] == i:
        result = result+1
result = int(result/2)
print(result)

Fixed submission:
s = input()
print(s[:4]+' '+s[4:])

Buggy python submission (verdict: Runtime Error):
s = input()
print(s[:4]+' '+s[4:]+'\n')

Fixed submission:
s = input()
print(s[:4]+' '+s[4:])

Buggy python submission (verdict: Runtime Error):
s = input()
print(s[:4]+' '+s[4:])

Fixed submission:
s = input()
print(s[:4]+' '+s[4:])
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split(" ")))
cnt=0
for i in range(n):
    for j in range(i,n):
        if a[i]-1==j and a[j]-1==i:
            cnt += 1
print(cnt)

Fixed submission:
n = int(input())
a = list(map(int, input().split(" ")))
cnt=0
for i in range(n):
    if a[a[i]-1]-1==i:
        cnt += 1
print(int(cnt/2))
Buggy python submission (verdict: Runtime Error):
s=input()
k=int(input())
d = dict()
for i in range(len(alphabet)):
    d[alphabet[i]]=i
    
def f(s,k):
    s = [s[i] for i in range(len(s))]
    res = s
    L = 0
    for i in range(len(s)):
        l = max(26 - d[s[i]],0)
        if L + l < k:
            res[i] = "a"
            L += l
        else:
            if i==len(s)-1:
                res[i] = alphabet[(d[s[i]] + (k-L)) % 26]
            continue
    return(''.join(res))
print(f(s,k))

Fixed submission:
s=input()
k=int(input())
d = dict()
alphabet = "abcdefghijklmnopqrstuvwxyz"
for i in range(len(alphabet)):
    d[alphabet[i]]=i
    
def f(s,k):
    s = [s[i] for i in range(len(s))]
    res = s
    L = 0
    for i in range(len(s)):
        l = max((26 - d[s[i]]) % 26, 0)
        if i==len(s)-1:
            res[i] = alphabet[(d[s[i]] + (k-L)) % 26]
        else:
            if L + l <= k:
                res[i] = "a"
                L += l
            else:
                continue
    return(''.join(res))
print(f(s,k))

Buggy python submission (verdict: Runtime Error):
s=input()
k=int(input())
d = dict()
for i in range(len(alphabet)):
    d[alphabet[i]]=i
    
def f(s,k):
    s = [s[i] for i in range(len(s))]
    res = s
    L = 0
    for i in range(len(s)):
        l = max(26 - d[s[i]],0)
        if L + l < k:
            res[i] = "a"
            L += l
        else:
            if i==len(s)-1:
                res[i] = alphabet[(d[s[i]] + (k-L)) % 26]
            continue
    return(''.join(res))
f(s,k)

Fixed submission:
s=input()
k=int(input())
d = dict()
alphabet = "abcdefghijklmnopqrstuvwxyz"
for i in range(len(alphabet)):
    d[alphabet[i]]=i
    
def f(s,k):
    s = [s[i] for i in range(len(s))]
    res = s
    L = 0
    for i in range(len(s)):
        l = max((26 - d[s[i]]) % 26, 0)
        if i==len(s)-1:
            res[i] = alphabet[(d[s[i]] + (k-L)) % 26]
        else:
            if L + l <= k:
                res[i] = "a"
                L += l
            else:
                continue
    return(''.join(res))
print(f(s,k))
Buggy python submission (verdict: Runtime Error):
S = raw_input()

print S[0:4] + " " + s[4:12]

Fixed submission:
S = raw_input()

print S[0:4] + " " + S[4:12]
Buggy python submission (verdict: Time Limit Exceeded):
s = raw_input()
K = input()

alpha = [chr(i) for i in range(97,97+26)]

for moji in range(len(s)):
	if alpha.index(s[moji]) != 0:
		if K >= 26-alpha.index(s[moji]):
			K = K - (26-alpha.index(s[moji]))
			s = s[:moji] + 'a' + s[moji+1:] 

if K>0:
	last_char = alpha[ alpha.index(s[-1]) + (K % 26) ]
	s = s[:-1] + last_char

print s

Fixed submission:
s = raw_input()
K = input()

alpha = [chr(i) for i in range(97,97+26)]

i = 0
while K>=26 and i<len(s)-1:
	if alpha.index(s[i]) != 0:
		K = K - (26 - alpha.index(s[i]))
		s = s[:i] + 'a' + s[i+1:]
	i=i+1

for moji in range(i, len(s)):
	if alpha.index(s[moji]) != 0:
		if K >= 26-alpha.index(s[moji]):
			K = K - (26-alpha.index(s[moji]))
			s = s[:moji] + 'a' + s[moji+1:] 

if K>0:
	last_char = alpha[ alpha.index(s[-1]) + (K % 26) ]
	s = s[:-1] + last_char

print s

Buggy python submission (verdict: Runtime Error):
s = raw_input()
K = input()

alpha = [chr(i) for i in range(97,97+26)]

for moji in range(1, len(s)+1):
	if alpha.index(s[moji-1]) != 0:
		if K >= 26-alpha.index(s[moji-1]):
			K = K - (26-alpha.index(s[moji-1]))
			s = s[:moji-1] + 'a' + s[moji:] 

if K>0:
	last_char = alpha[ alpha.index(s[-1]) + (K % 26) ]
	s = s[:-1] + last_char

print s

Fixed submission:
s = raw_input()
K = input()

alpha = [chr(i) for i in range(97,97+26)]

i = 0
while K>=26 and i<len(s)-1:
	if alpha.index(s[i]) != 0:
		K = K - (26 - alpha.index(s[i]))
		s = s[:i] + 'a' + s[i+1:]
	i=i+1

for moji in range(i, len(s)):
	if alpha.index(s[moji]) != 0:
		if K >= 26-alpha.index(s[moji]):
			K = K - (26-alpha.index(s[moji]))
			s = s[:moji] + 'a' + s[moji+1:] 

if K>0:
	last_char = alpha[ alpha.index(s[-1]) + (K % 26) ]
	s = s[:-1] + last_char

print s

Buggy python submission (verdict: Time Limit Exceeded):
s = raw_input()
K = input()

alpha = [chr(i) for i in range(97,97+26)]

for moji in range(1, len(s)+1):
	if alpha.index(s[moji-1]) != 0:
		if K >= 26-alpha.index(s[moji-1]):
			K = K - (26-alpha.index(s[moji-1]))
			s = s[:moji-1] + 'a' + s[moji:] 

if K>0:
	last_char = alpha[ alpha.index(s[-1]) + (K % 26) ]
	s = s[:-1] + last_char

print s

Fixed submission:
s = raw_input()
K = input()

alpha = [chr(i) for i in range(97,97+26)]

i = 0
while K>=26 and i<len(s)-1:
	if alpha.index(s[i]) != 0:
		K = K - (26 - alpha.index(s[i]))
		s = s[:i] + 'a' + s[i+1:]
	i=i+1

for moji in range(i, len(s)):
	if alpha.index(s[moji]) != 0:
		if K >= 26-alpha.index(s[moji]):
			K = K - (26-alpha.index(s[moji]))
			s = s[:moji] + 'a' + s[moji+1:] 

if K>0:
	last_char = alpha[ alpha.index(s[-1]) + (K % 26) ]
	s = s[:-1] + last_char

print s
Buggy python submission (verdict: Runtime Error):
n, x = map(int, raw_input().split())

def cal(n):
	return n + 1 + (n - 2)*2

if n % x == 0:
	l = cal(n) - cal(x)
else:
	l = cal(n)

print l


Fixed submission:
n = int(raw_input())
l = map(int, raw_input().split())

l.sort()
sum = 0
for i in l[::2]:
	sum += i

print sum
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = map(int, input().split())

pairs = []

for i in range(len(A)):
    if A[A[i] - 1] == i + 1:
        pairs.append(1)

print(len(pairs) // 2)

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

pairs = []

for i in range(len(A)):
    if A[A[i] - 1] == i + 1:
        pairs.append(1)

print(len(pairs) // 2)

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

pairs = []

for i in A:
    if A[A[i] - 1] = i + 1:
        pairs.append(1)

print(len(pairs) // 2)

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

pairs = []

for i in range(len(A)):
    if A[A[i] - 1] == i + 1:
        pairs.append(1)

print(len(pairs) // 2)
Buggy python submission (verdict: Time Limit Exceeded):
import sys

def main():
    l = input().split()
    a = int(l[0])
    b = int(l[1])

    temp = 1
    for i in range(a, b+1):
        temp *= i
    else:
        if temp == 0:
            print("Zero")
        elif temp > 0:
            print("Positive")
        else:
            print("Negative")


if __name__ == '__main__':
    main()


Fixed submission:
import sys

def main():
    l = input().split()
    a = int(l[0])
    b = int(l[1])

    if a <= 0 and b >= 0:
        print("Zero")
    elif a > 0:
        print("Positive")
    elif b < 0:
        if (b - a) % 2 != 0:
            print("Positive")
        else:
            print("Negative")

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import sys

def main():
    l = input().split()
    a = int(l[0])
    b = int(l[1])

    if a > b:
        print("plz let 'a' smaller than 'b'")
        quit()

    temp = 1
    for i in range(a, b+1):
        temp *= i
    else:
        if temp == 0:
            print("Zero")
        elif temp > 0:
            print("Positive")
        else:
            print("Negative")


if __name__ == '__main__':
    main()


Fixed submission:
import sys

def main():
    l = input().split()
    a = int(l[0])
    b = int(l[1])

    if a <= 0 and b >= 0:
        print("Zero")
    elif a > 0:
        print("Positive")
    elif b < 0:
        if (b - a) % 2 != 0:
            print("Positive")
        else:
            print("Negative")

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
import sys

def main():
    a = int(sys.argv[1])
    b = int(sys.argv[2])

    temp = 1
    for i in range(a, b+1):
        temp *= i
    else:
        if temp == 0:
            print("Zero")
        elif temp > 0:
            print("Positive")
        else:
            print("Negative")


if __name__ == '__main__':
    main()


Fixed submission:
import sys

def main():
    l = input().split()
    a = int(l[0])
    b = int(l[1])

    if a <= 0 and b >= 0:
        print("Zero")
    elif a > 0:
        print("Positive")
    elif b < 0:
        if (b - a) % 2 != 0:
            print("Positive")
        else:
            print("Negative")

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
import sys

def main():
    a = int(sys.argv[1])
    b = int(sys.argv[2])

    if a <= 0 and b >= 0:
        print("Zero")
        quit()

    temp = 1
    for i in range(a, b+1):
        temp *= i
    else:
        if temp > 0:
            print("Positive")
        else:
            print("Negative")


if __name__ == '__main__':
    main()


Fixed submission:
import sys

def main():
    l = input().split()
    a = int(l[0])
    b = int(l[1])

    if a <= 0 and b >= 0:
        print("Zero")
    elif a > 0:
        print("Positive")
    elif b < 0:
        if (b - a) % 2 != 0:
            print("Positive")
        else:
            print("Negative")

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
#read in input
s = map((lambda x: ord(x) - 96), raw_input())
k = int(raw_input())


for i in range(len(s)):
  sv = s[i]
  if sv == 1 || (27 - sv) > k:
    continue
  s[i] = 1
  k = k - (27 - sv)

s[-1] = (((s[-1] + k) - 1) % 26) + 1

print "".join(map((lambda x: chr(x + 96)), s))

Fixed submission:
#read in input
s = map((lambda x: ord(x) - 96), raw_input())
k = int(raw_input())


for i in range(len(s)):
  sv = s[i]
  if sv == 1 or (27 - sv) > k:
    continue
  s[i] = 1
  k = k - (27 - sv)

s[-1] = (((s[-1] + k) - 1) % 26) + 1

print "".join(map((lambda x: chr(x + 96)), s))
Buggy python submission (verdict: Runtime Error):
import itertools

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

cnt = 0

for i in range(n+1):
    for v in itertools.combinations(x,i+1):
        if sum(v) == a*(i+1): #組み合わせのカードの平均がaと等しいならば
            cnt = cnt + 1

print(cnt)


Fixed submission:
n, k, x, y = map(int, [input() for i in range(4)])

if k <= n:
    total = k*x + (n-k)*y
else :
    total = n*x

print(total)
Buggy python submission (verdict: Runtime Error):
n,k = map(int,input().split()) #入力
a = list(map(int,input().split())) #使用不可の数字
b = {0,1,2,3,4,5,6,7,8,9}-set(a) #使用可能な数字の集合
n = [int(i) for i in list(str(n))] #価格(int)をリストに分解

while set([int(i) for i in list(str(n))])-b !={} : # 使用可能な数字のみでなければ
    n += 1

print(n)

Fixed submission:
n,k = map(int,input().split()) #入力
a = list(map(int,input().split())) #使用不可の数字
b = {0,1,2,3,4,5,6,7,8,9}-set(a) #使用可能な数字の集合
while set([int(i) for i in list(str(n))])-b !=set() : # 使用可能な数字のみでなければ
    n += 1
print(n)

Buggy python submission (verdict: Runtime Error):
n,k = map(int,input().split()) #入力
a = list(map(int,input().split())) #使用不可の数字
n2 = [int(i) for i in list(str(n))] #価格を分解
for i in n2:
    while n2[i] in a :#使用不可ならば
        n2[i] += 1
        if n2[i]>=10:
            n2[i] =1

print("".join([str(i) for i in n2]))

Fixed submission:
n,k = map(int,input().split()) #入力
a = list(map(int,input().split())) #使用不可の数字
b = {0,1,2,3,4,5,6,7,8,9}-set(a) #使用可能な数字の集合
while set([int(i) for i in list(str(n))])-b !=set() : # 使用可能な数字のみでなければ
    n += 1
print(n)

Buggy python submission (verdict: Runtime Error):
n,k = map(int,input().split()) #入力
a = list(map(int,input().split())) #使用不可の数字
b = list({0,1,2,3,4,5,6,7,8,9}-set(a)) #使用可能な数字のリスト
n2 = [int(i) for i in list(str(n))] #価格を分解

for i in n2:
    while n2[i] in a :#使用不可ならば
        n2[i] += 1

print("".join([str(i) for i in n2]))

Fixed submission:
n,k = map(int,input().split()) #入力
a = list(map(int,input().split())) #使用不可の数字
b = {0,1,2,3,4,5,6,7,8,9}-set(a) #使用可能な数字の集合
while set([int(i) for i in list(str(n))])-b !=set() : # 使用可能な数字のみでなければ
    n += 1
print(n)
Buggy python submission (verdict: Runtime Error):
import copy
s = list(input())
def make1d(n):
    return [copy.deepcopy(1) for i in range(0,n)]
t = make1d(26)
for i in range(0, len(s)):
    t[ord(s[i]) - 97] = t[ord(s[i]) - 97] * (-1)
u = 0
for i in range(0, len(s)):
    u = u + t[i]
if u == 26:
    print('Yes')
else:
    print('No')

Fixed submission:
import copy
s = list(input())
def make1d(n):
    return [copy.deepcopy(1) for i in range(0,n)]
t = make1d(26)
for i in range(0, len(s)):
    t[ord(s[i]) - 97] = t[ord(s[i]) - 97] * (-1)
u = 0
for i in range(0, len(t)):
    u = u + t[i]
if u == 26:
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
import copy
s = list(input())
def make1d(n):
    return [copy.deepcopy(1) for i in range(0,n)]
t = make1d(26)
for i in range(0, len(s)):
    t[ord(s[i]) - 97] = t[ord(s[i]) - 97] * (-1)
u = 1
for i in range(0, len(s)):
    u = u * t[i]
if u == 1:
    print('Yes')
else:
    print('No')

Fixed submission:
import copy
s = list(input())
def make1d(n):
    return [copy.deepcopy(1) for i in range(0,n)]
t = make1d(26)
for i in range(0, len(s)):
    t[ord(s[i]) - 97] = t[ord(s[i]) - 97] * (-1)
u = 0
for i in range(0, len(t)):
    u = u + t[i]
if u == 26:
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
import copy
s = list(input())
def make1d(n):
    return [copy.deepcopy(1) for i in range(0,n)]
t = make1d(26)
for i in range(0, len(s)):
    t[ord(s[i]) - 97] = t[ord(s[i]) - 97] * (-1)
print(t)
u = 1
for i in range(0, len(s)):
    u = u * t[i]
if u == 1:
    print('Yes')
else:
    print('No')

Fixed submission:
import copy
s = list(input())
def make1d(n):
    return [copy.deepcopy(1) for i in range(0,n)]
t = make1d(26)
for i in range(0, len(s)):
    t[ord(s[i]) - 97] = t[ord(s[i]) - 97] * (-1)
u = 0
for i in range(0, len(t)):
    u = u + t[i]
if u == 26:
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
import copy
s = list(input())
def make1d(n):
    return [copy.deepcopy(1) for i in range(0,n)]
t = make1d(26)
for i in range(0, len(s)):
    t[i] = t[ord(s[i]) - 97] * (-1)
u = 1
for i in range(0, len(s)):
    u = u * t[i]
if u == 1:
    print('Yes')
else:
    print('No')

Fixed submission:
import copy
s = list(input())
def make1d(n):
    return [copy.deepcopy(1) for i in range(0,n)]
t = make1d(26)
for i in range(0, len(s)):
    t[ord(s[i]) - 97] = t[ord(s[i]) - 97] * (-1)
u = 0
for i in range(0, len(t)):
    u = u + t[i]
if u == 26:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
import ita
s=int(input())
n=0
while(s>0):
  n=n+s
  s=s-1
print(n)

Fixed submission:
s=int(input())
n=0
while(s>0):
  n=n+s
  s=s-1
print(n)

Buggy python submission (verdict: Runtime Error):
s=print(int(input()))
n=0
while(s>0):
  n=n+1
  s=s-1
return(n)

Fixed submission:
s=int(input())
n=0
while(s>0):
  n=n+s
  s=s-1
print(n)

Buggy python submission (verdict: Runtime Error):
s = print(int(input()))
n = 0
for i in range(0, s):
  n = n + 1
return(n)


Fixed submission:
s=int(input())
n=0
while(s>0):
  n=n+s
  s=s-1
print(n)

Buggy python submission (verdict: Runtime Error):
s = print(int(input()))
n = 0
for i in range(1, s):
  n = n + 1
return(n)

Fixed submission:
s=int(input())
n=0
while(s>0):
  n=n+s
  s=s-1
print(n)
Buggy python submission (verdict: Runtime Error):
import statistics as st
import math
int(input())
s = list(map(int, input().split()))
md = math.floor(st.mean(s))
mu = avedown + 1
sd = 0
su = 0
for i in range(0, len(s)):
    sd = sd + (s[i] - md) ** 2
    su = su + (s[i] - mu) ** 2
print(min(sd, su))

Fixed submission:
import statistics as st
import math
int(input())
s = list(map(int, input().split()))
md = math.floor(st.mean(s))
mu = md + 1
sd = 0
su = 0
for i in range(0, len(s)):
    sd = sd + (s[i] - md) ** 2
    su = su + (s[i] - mu) ** 2
print(min(sd, su))
Buggy python submission (verdict: Runtime Error):
a = input()
b = input()
h = 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):
(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):
return (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):
a = input()
b = input()
c = input()

player = a
while True:
  l = player[0]
  player = player[1:]
  if len(player) == 0
  	print(player)
  player = l
  

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

i = "a"
player = {"a":a,"b":b,"c":c}

while True:
    if len(player[i])==0:
        print(i.upper())
        break
    l = player[i][0]
    player[i] = player[i][1:]
    i = l
Buggy python submission (verdict: Runtime Error):
n = int (input())
resilt =0
for i in range(1,n):
    result =result +i
print (result)

Fixed submission:
n = int (input())
result =0
for i in range(1,n+1):
    result =result +i
print (result)

Buggy python submission (verdict: Runtime Error):
n = int (input())
resilt =0
for i in range(1,n):
  result =result +i
print result

Fixed submission:
n = int (input())
result =0
for i in range(1,n+1):
    result =result +i
print (result)

Buggy python submission (verdict: Runtime Error):
n = int (input())
for i in range(1,n):
  result =result + i
print result

Fixed submission:
n = int (input())
result =0
for i in range(1,n+1):
    result =result +i
print (result)

Buggy python submission (verdict: Runtime Error):
n = int (input())
print (n*(n+1)/2))


Fixed submission:
n = int (input())
result =0
for i in range(1,n+1):
    result =result +i
print (result)
Buggy python submission (verdict: Runtime Error):
a,b,c= input().split()
if len(a) == 7:
  if len (b) ==5 and len(c) == 5:
    print "YES"
  else:
    print "NO"
else:
  if len(b) =! 7 and len(c)=!7:
    print "NO"
  else:
    if len(b) ==7 and len (c) ==5:
      print "YES"
    else:
      if len(b) ==5 and len(c) ==7:
        print "YES"
      else:
        print "NO"
    

Fixed submission:
a, b, c = map(int,input().split())
if a == 7:
    if b==5 and c ==5:
        print ("YES")
    else:
        print ("NO")
elif b != 7 and c !=7:
    print ("NO1")
elif b ==7:
    if a==5 and c ==5:
        print ("YES")
    else:
        print ("NO")
elif a==5 and b ==5:
    print ("YES")
else:
    print ("NO")
Buggy python submission (verdict: Runtime Error):
a = input()
b = input()
c = input()
d = 0
d = a + b
d = d * c / 2
print(d)

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

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

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

d = 0
d = a + b
d = d * c / 2

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

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

Buggy python submission (verdict: Runtime Error):
a = int.print(a)
b = int.print(b)
h = int.print(h)

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

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

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