Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
from sys import stdin,stdout

def main():
    line=stdin.readline()
    parts=line.split()
    a=int(parts[0])
    par=int(a/2)
    impar=int(a/2)+a%2
    stdout.write(par*impar)
main()

Fixed submission:
k = int(input())
x = [i for i in range(1, k+1) if i & 1 == 0]
y = [i for i in range(1, k+1) if i & 1 == 1]
print(len(x)*len(y))

Buggy python submission (verdict: Runtime Error):
N=int(input("enter number")) 
even=0
odd=0
if N%2==0:
    even=N/2
    odd=N/2
elif N=0:
    even=1
    odd=1
else:
    even=N//2
    odd=(N//2) +1
Print(even*odd)
Comment in Mark

Fixed submission:
k = int(input())
x = [i for i in range(1, k+1) if i & 1 == 0]
y = [i for i in range(1, k+1) if i & 1 == 1]
print(len(x)*len(y))

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

Fixed submission:
k = int(input())
x = [i for i in range(1, k+1) if i & 1 == 0]
y = [i for i in range(1, k+1) if i & 1 == 1]
print(len(x)*len(y))

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

y=x//2

if (y%2==0):
    print (y**2)
elif print ((y**2)+1)

Fixed submission:
k = int(input())
x = [i for i in range(1, k+1) if i & 1 == 0]
y = [i for i in range(1, k+1) if i & 1 == 1]
print(len(x)*len(y))

Buggy python submission (verdict: Runtime Error):
k=input()  
odd=1
even=0
for i in range(2,k+1) 
     if i%2==0:
        even+=1
     else:
           odd+=1
print(odd*even)

Fixed submission:
k = int(input())
x = [i for i in range(1, k+1) if i & 1 == 0]
y = [i for i in range(1, k+1) if i & 1 == 1]
print(len(x)*len(y))

Buggy python submission (verdict: Runtime Error):
k=input()
pair=0
for i in range(1,k+1):
     for j in range (2,k+1)
          if i%2==0 and j%2!=0:
              pair+=1
         ELIF i%2!=0 and j%2==0 :
               pair+=1
          else:
                pass
print(pair)
                        




Fixed submission:
k = int(input())
x = [i for i in range(1, k+1) if i & 1 == 0]
y = [i for i in range(1, k+1) if i & 1 == 1]
print(len(x)*len(y))
Buggy python submission (verdict: Time Limit Exceeded):
n, k= map(int, input().split())
List=[1 for i in range(1, n+1)
      for j in range(1, n+1)
      for l in range(1, n+1) if (i+j)%k==0 and (j+l)%k==0 and (i+l)%k==0]

print(len(List))

Fixed submission:
n, k = map(int, input().split())
if k % 2: print((n // k) ** 3)
else: print((n // k) ** 3 + ((n - k //2) // k + 1) ** 3)

Buggy python submission (verdict: Time Limit Exceeded):
n, k= map(int, input().split())
count=0
for i in range(1, n+1):
    for j in range(1, n+1):
        for l in range(1, n+1):
            if (i+j)%k==0 and (j+l)%k==0 and (i+l)%k==0:
                count+=1
print(count)

Fixed submission:
n, k = map(int, input().split())
if k % 2: print((n // k) ** 3)
else: print((n // k) ** 3 + ((n - k //2) // k + 1) ** 3)
Buggy python submission (verdict: Runtime Error):
n=int(input())


a=int(input())


print(int(n-a+1))

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

#comment

Buggy python submission (verdict: Runtime Error):
N,i=map(int,input().split())
k=(N-i)+1
print(k)





















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

#comment

Buggy python submission (verdict: Runtime Error):
n =int(input("enter number of car_train. "))
i = int(input("enter ith from the front  of train . "))
def train(n ,i):
    if n == i:
        print (1)
    else :
        print ((n-i)+1)



train(n,i)

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

#comment
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
contador = 0
res = 0
while(True):
    contador += 1
    if contador % 2 == 0 and contador % n == 0:
        res = contador
        break;
print(res,'\n')

Fixed submission:
def main():
    a, b = 2, int(input())
    ta, tb = a, b
    if b == 0: print(0)
    while a%b != 0:
       a, b = b, a%b
    print(int((ta*tb)/b))
main()

Buggy python submission (verdict: Runtime Error):
from math import gcd
n = int(input())
def lcm2(x):
    return x * 2 // gcd(x, 2)
print(lcm2(n))

Fixed submission:
def main():
    a, b = 2, int(input())
    ta, tb = a, b
    if b == 0: print(0)
    while a%b != 0:
       a, b = b, a%b
    print(int((ta*tb)/b))
main()

Buggy python submission (verdict: Time Limit Exceeded):
a = int (input ())
b = 2
number = b

while number % a != 0 or number % b != 0:
    number += 1

print (number)

Fixed submission:
def main():
    a, b = 2, int(input())
    ta, tb = a, b
    if b == 0: print(0)
    while a%b != 0:
       a, b = b, a%b
    print(int((ta*tb)/b))
main()

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

i=0
while(True):
  i+=1
  if (i % N == 0 and i % 2==0):
    print(i)
    break



Fixed submission:
def main():
    a, b = 2, int(input())
    ta, tb = a, b
    if b == 0: print(0)
    while a%b != 0:
       a, b = b, a%b
    print(int((ta*tb)/b))
main()
Buggy python submission (verdict: Time Limit Exceeded):
c = input()

m = map(int, raw_input().split())
conte = 0
while(True):
	entrou = False
	
	for i in range(c):
		if (not entrou and m[i]%2==0):
			entrou = True;
			conte += 1
			m[i] /= 2
		else:
			m[i] *= 3
	
	if(not entrou):
		print conte
		break
			

Fixed submission:
n = int(raw_input())
m = map(int, raw_input().split())
total = 0
for i in m:
	while i % 2 == 0:
		total += 1
		i /= 2
print total
Buggy python submission (verdict: Runtime Error):
line = input()
num_a, num_b = [int(n) for n in line.split()][0]
print(max([num_a + num_b, num_a - num_b, num_a * num_b]))

Fixed submission:
a,b = map(int,input().split())
print(max([a+b,a-b,a*b]))

Buggy python submission (verdict: Runtime Error):
line = input()
A,B = [int(u) for u in line]
def func(a,b)
    return min(a+b,a-b,a*b)
print(func(A,B))

Fixed submission:
a,b = map(int,input().split())
print(max([a+b,a-b,a*b]))

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

c = a + b
d = a - b
e = a * b
ary = [c, d, e]
f = max(ary)
print ("Max:", f)

Fixed submission:
a,b = map(int,input().split())
print(max([a+b,a-b,a*b]))
Buggy python submission (verdict: Runtime Error):
line = input()
num_a, num_b, num_c, num_k = [int(n) for n in line.split()][0]
numbers = [num_a, num_b, num_c]
numbers.sort(reverse=True)
numbers[0] *= 2**num_k
print(sum(numbers))

Fixed submission:
num = input()
A = int(num.split(' ')[0])
B = int(num.split(' ')[1])
C = int(num.split(' ')[2])
K = int(input())
num = [A,B,C]
while K>0:

    posi = num.index(max(num))
    num[posi]=num[posi]*2

    K=K-1

print(sum(num))
Buggy python submission (verdict: Runtime Error):
package main

import (
	"fmt"
)

func main(){
	var A, B int
	fmt.Scan(&A)
	fmt.Scan(&B)
	if A+B > 16 {
		panic("Exceeded pieces!")
	}
	if A > 8 || B > 8 {
		fmt.Println(":(")
	} else {
		fmt.Println("Yay!")
	}
}

Fixed submission:
num = input()
a = int(num.split(' ')[0])
b = int(num.split(' ')[1])
x = int(num.split(' ')[2])


if a+b>=x:
    if a>x:
        print("NO")
    else:
        print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
#include <stdio.h>
int main (){
int gatos, animais, X;
scanf("%d%d%d", &gatos,&animais,&X);
if (X >= gatos && animais + gatos >= X)
    printf("YES");
else
	printf("NO");

	return 0;
}

Fixed submission:
num = input()
a = int(num.split(' ')[0])
b = int(num.split(' ')[1])
x = int(num.split(' ')[2])


if a+b>=x:
    if a>x:
        print("NO")
    else:
        print("YES")
else:
    print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
lst = [int(i) for i in input().split()]
lst.insert(0, 0)
res = [0]
for i in range(1, N+1):
    t = lst[:]
    del(t[i])
    k = 0
    for i in range(1, len(t)):
        k += abs(t[i] - t[i-1])
    res.append(sum([abs(t[i] - t[i-1]) for i in range(1, N)]) + abs(t[-1]))

for i in range(1, N+1):
    print(res[i])


Fixed submission:
x = int(raw_input())
s = raw_input().split(" ")
s.insert(0, "0")

def cost(a, b):
 return abs(int(a)-int(b))

totalCost = cost(s[-1], s[0])
skipGain = [None] * (x+1)

costPrev = cost(s[0], s[1])
for i in range(0, x):#i=0 skipping 1st one, prev=0-1, post=1-2
 costThisOne = cost(s[i+1], s[0 if i==x-1 else i+2])
 totalCost += costPrev
 skipGain[i+1] = cost(s[i], s[0 if i==x-1 else i+2]) - costPrev - costThisOne
 costPrev = costThisOne

for i in range(1, x+1):
 print totalCost + skipGain[i]
Buggy python submission (verdict: Runtime Error):
import math
x, y = map(int, input().split())

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

def thingo(x,y):
    if (x == 0 and y == 0):
        return -1
    if (x != 0 and y == 0):
        return x
    test = lcm(x,y)
    if (test-x >= x):
        return test-x
    else:
        return -1
print(thingo(x,y))


Fixed submission:
x,y = map(int,input().split())
 
if x%y == 0:
  print(-1)
else:
  print(x)

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

input = str(input()).split(" ")
for index in range(len(input)):
    input[index] = int(input[index])
x = input[0]
y = input[1]

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

def thingo(x,y):
    test = lcm(x,y)
    if (test-x >= x):
        return test-x
    else:
        return -1
print(thingo(x,y))


Fixed submission:
x,y = map(int,input().split())
 
if x%y == 0:
  print(-1)
else:
  print(x)

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

input = str(input()).split(" ")
for index in range(len(input)):
    input[index] = int(input[index])
x = input[0]
y = input[1]

def canBeDone(x,y):
    thingo = True
    while thingo:
        div = math.gcd(x,y)
        x = int(x/div)
        y = int(y/div)
        if (div == 1):
            thingo = False
    if (x == 1 and y == 1):
        return -1
    else:
        return 1

def test(x, y):
    if (canBeDone(x,y) == -1):
        return -1
    for index in range(1, abs(y)):
        if (x * index % y != 0 and abs(x * index) <= 10**(18)):
            return x * index
    return -1
print(test(x,y))


Fixed submission:
x,y = map(int,input().split())
 
if x%y == 0:
  print(-1)
else:
  print(x)
Buggy python submission (verdict: Runtime Error):
x=int(input())
a=int(input())
b=int(input())
//CODE Program
u=x-a
v=u//b
w=v*b
left=u-w
print(left)

Fixed submission:
x = int(raw_input())
a = int(raw_input())
b = int(raw_input())

x -= a
print x % b
Buggy python submission (verdict: Runtime Error):
You went shopping to buy cakes and donuts with 
X
 yen (the currency of Japan).

First, you bought one cake for 
A
 yen at a cake shop. Then, you bought as many donuts as possible for 
B
 yen each, at a donut shop.

How much do you have left after shopping?

Constraints
1
≤
A
,
B
≤
1
 
000
A
+
B
≤
X
≤
10
 
000
X
, 
A
 and 
B
 are integers.


Fixed submission:
a = int(input())
b = int(input())
c = int(input())
y = int(input())
 
ans = 0
 
for ai in range(a+1):
    for bi in range(b+1):
        for ci in range(c+1):
            amount = 500 * ai + 100 * bi + 50 * ci
            if amount == y:
                ans += 1
 
print(ans)

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
x = int(input())
 
ans = 0
 
for ai in range(a+1):
    for bi in range(b+1):
        for ci in range(c+1):
            amount = 500 * ai + 100 * bi + 50 * ci
            if amount == x:
                ans += 1
 // Input
print(ans)


Fixed submission:
a = int(input())
b = int(input())
c = int(input())
y = int(input())
 
ans = 0
 
for ai in range(a+1):
    for bi in range(b+1):
        for ci in range(c+1):
            amount = 500 * ai + 100 * bi + 50 * ci
            if amount == y:
                ans += 1
 
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
def sub(a, b, n):
 r = a[:]
 for i in range(len(b)):
  r[i] -= b[i] * n
 return r

def mult(a, n):
 r = a[:]
 for i in range(len(a)):
  r[i] *= n
 return r

def pm(matr):
 return ""

def rref(matr):
 if len(matr) == 0 or len(matr[0]) == 0:
  return matr
 pivotCt = 0
 for d in range(max(len(matr), len(matr[0])-1)):
  #scan for first pivot
  pivot = None
  for i in range(len(matr)):
   allZeroes = True
   for j in range(d):
    if matr[i][j] != 0:
     allZeroes = False
     break
   if matr[i][d] != 0 and allZeroes:
    pivot = mult(matr[i], 1/matr[i][d])
    del matr[i]
    matr.insert(pivotCt, pivot)
    break
  if pivot != None:
   for i in range(len(matr)):
    if i != pivotCt and matr[i][d] != 0:
     matr[i] = sub(matr[i], pivot, matr[i][d])
   pivotCt += 1
 return matr

s = raw_input().split(" ")
vs = int(s[0])
es = int(s[1])

matr = []
for i in range(es):
 matr.append([0] * (vs + 1))
 q = raw_input().split(" ")
 x = int(q[0])
 y = int(q[1])
 z = int(q[2])
 matr[i][x] = 1
 matr[i][y] = -1
 matr[i][-1] = z

matr = rref(matr)
bad = False
for i in range(len(matr)):
 allZeroes = True
 for j in range(len(matr[0])-1):
  if matr[i][j] != 0:
   allZeroes = False
   break
 if allZeroes and matr[i][-1] != 0:
   bad = True
   break

if bad:
 print "No"
else:
 print "Yes"

Fixed submission:
n, m = map(int, input().split())
inf = 10**10
G = [{} for i in range(n)]
for i in range(m):
    l, r, d = map(int, input().split())
    G[l-1][r-1] = d
    G[r-1][l-1] = -d
V = [False for i in range(n)]
D = [inf for i in range(n)]
for i in range(n):
    if V[i]:
        continue
    Q = [i]
    D[i] = 0
    while Q:
        j = Q.pop()
        V[j] = True
        for k in G[j].keys():
            if not V[k]:
                Q.append(k)
            if D[k] == inf:
                D[k] = D[j]+G[j][k]
            elif D[k] != D[j]+G[j][k]:
                print('No')
                exit()
print('Yes')
Buggy python submission (verdict: Runtime Error):
s=input()
p=input()
q=s+p
q=int(q)
l=q**(1/2.0)
m=int(l)
if(l==m):
    print("YES")
else:
    print("NO")


Fixed submission:
# Q.B
import math
a,b = map(int,input().split(" "))
num = int(str(a)+str(b))
sq = math.sqrt(num)
isq = int(sq)
if isq*isq==num:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
from collections import Counter
a = int(input())
l = []
for i in range(0,a):
    b = int(input())
    l.append(b)
c=Counter(l)
d = dict(c)
print(d)
kv = []
for k,v in d.items():
    if k>v:
        t = v
        kv.append(t)
    elif k<v:
        t = v-k
        kv.append(t)
s = sum(kv)
print(s)




Fixed submission:
n = int(input())
seq = [int(x) for x in input().split()]

if len(seq) == 1:
  if seq[0] == 1:
    print("0")
  else:
    print("1")
else:
  total = 0
  counts = {}
  for x in seq:
    if x not in counts:
      counts[x] = 1
    else:
      counts[x] += 1

  for key,val in counts.items():
    if val < key:
      total += val
    else:
      total += abs(key-val)
  print(total)
Buggy python submission (verdict: Runtime Error):
import sys

n=int(input())
l=[int(n) for n in input().split()]
sum=0
for i in l:
    if i%2!=0:
        oc=0
    sum+=i
if(oc==0):
    print(0)
else:
    c=0
    while(sum%2==0 and sum>=2):
        c+=1
        sum=sum//2
    print(c)

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

flag=1
c=0
while flag==1:
  for i in range(0,n):
    if a[i]%2!=0:
      flag=0
      break
  if flag==1:
    c+=1
    for j in range(0,n):
      a[j]//=2
print(c)
Buggy python submission (verdict: Runtime Error):
x=int(input(""))
y=int(input(""))
z=int(input(""))
answer= (x-z)//(z+y)
print(answer)

Fixed submission:

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

nu=(x[0]-x[2]) % (x[1]+x[2])
res=(x[0]-x[2]-nu) / (x[1]+x[2])
print(int(res))

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

print(x//(z+y))

Fixed submission:

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

nu=(x[0]-x[2]) % (x[1]+x[2])
res=(x[0]-x[2]-nu) / (x[1]+x[2])
print(int(res))
Buggy python submission (verdict: Runtime Error):
a=list (map(input()) )
 if(a[0]==a[5] &&a[1]==a[4]&&a[2]==a[3]):
        print("Yes" )
else:
       print("No")


Fixed submission:
a=input()
b=input()
if(a[2]==b[0] and a[1]==b[1] and a[0]==b[2]):
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Runtime Error):
import math
n = int(input())


for i in the range(n+1):
    ans= math.sqrt(i)
    ans= str(ans)
    if "." not in ans:
        print(ans)
        break


Fixed submission:
n = int(input())
i = 1
while i * i <= n:
    i += 1
print((i - 1) * (i - 1))
Buggy python submission (verdict: Runtime Error):
a = input()
i = 1
while (i<=a):
	i =i * 2
print(i/2)
	


Fixed submission:
a = int(input())
i = 1
while(i<=a):
	i *= 2
print(int(i/2))

Buggy python submission (verdict: Runtime Error):
a = input()
i = 1
while i <= a :  
    i *= 2
print(i/2)

Fixed submission:
a = int(input())
i = 1
while(i<=a):
	i *= 2
print(int(i/2))
Buggy python submission (verdict: Runtime Error):
n, m = list(map(int, input().split()))


connections = dict()
answer = {
    'true': 'POSSIBLE',
    'false': 'IMPOSSIBLE'
}


def add_to_set(a, b):
    if a in connections:
        connections[a].add(b)
    else:
        connections[a] = set([b])

    if b in connections:
        connections[b].add(a)
    else:
        connections[b] = set([a])


for i in range(m):
    a, b = list(map(int, input().split()))
    add_to_set(a, b)

island_1 = connections.get(1)
island_N = connections.get(n)

for e in island_1:
    if e in island_N:
        print(answer['true'])
    else:
        print(answer['false'])

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

is1 = [False] * (n + 1)
isN = [False] * (n + 1)

for i in range(m):
    a, b = map(int, input().split())
    if(a > b):
        a, b = b, a
    if(a == 1):
        is1[b] = True
    if(b == n):
        isN[a] = True

import sys

for i in range(2, n):
    if(is1[i] and isN[i]):
        print("POSSIBLE")
        sys.exit(0)

print("IMPOSSIBLE")

Buggy python submission (verdict: Runtime Error):
n, m = input().split()

m = int(m)


connections = {}
answer = {
    'true': 'POSSIBLE',
    'false': 'IMPOSSIBLE'
}


def add_to_set(a, b):
    if a in connections:
        connections[a].add(b)
    else:
        connections[a] = {b}

    if b in connections:
        connections[b].add(a)
    else:
        connections[b] = {a}


for i in range(m):
    a, b = input().split()
    add_to_set(a, b)


for e in connections['1']:
    if e in connections[n]:
        print(answer['true'])
    else:
        print(answer['false'])

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

is1 = [False] * (n + 1)
isN = [False] * (n + 1)

for i in range(m):
    a, b = map(int, input().split())
    if(a > b):
        a, b = b, a
    if(a == 1):
        is1[b] = True
    if(b == n):
        isN[a] = True

import sys

for i in range(2, n):
    if(is1[i] and isN[i]):
        print("POSSIBLE")
        sys.exit(0)

print("IMPOSSIBLE")

Buggy python submission (verdict: Runtime Error):
n,m=map(int, input().split())
main_list=list()
list2=list()
for i in range(m):
    a,b=map(int, input().split())
    list2.append(a)
    list2.append(b)
    main_list.append(list2)
    list2=[]
for i in range(m):
    if main_list[i][0]==1:
        for j in range(m):
            if (main_list[i][1]==main_list[j][0])and(main_list[j][1]==n):
                k=0
                print("POSSIBLE")
                break
if k!=0:
    print("IMPOSSIBLE")

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

is1 = [False] * (n + 1)
isN = [False] * (n + 1)

for i in range(m):
    a, b = map(int, input().split())
    if(a > b):
        a, b = b, a
    if(a == 1):
        is1[b] = True
    if(b == n):
        isN[a] = True

import sys

for i in range(2, n):
    if(is1[i] and isN[i]):
        print("POSSIBLE")
        sys.exit(0)

print("IMPOSSIBLE")
Buggy python submission (verdict: Time Limit Exceeded):
inp = input().split(" ")
N = int(inp[0])
K = int(inp[1])

arr = {}
keys = []

for i in range(N):
	inp = input().split(" ")
	a = int(inp[0])
	b = int(inp[1])
	if a in arr:
		arr[a] += b
	else:
		arr[a] = b
		keys.append(a)
		keys.sort()

for i in keys:
	K -= arr[i]
	if K <= 0:
		print(i)
		break

Fixed submission:
def main():
    n, k = [int(x) for x in input().split(' ')]
    arr = [0] * 100001
    for _ in range(n):
        a, b = [int(x) for x in input().split(' ')]
        arr[a] += b
    foo = 0
    for i, e in enumerate(arr):
        foo += e
        if (foo >= k):
            print(i)
            break

main()

Buggy python submission (verdict: Time Limit Exceeded):
line_one = raw_input().split()
n = int(line_one[0])
k = int(line_one[1])

arr = []
for i in range(n):
    line = raw_input().split()
    a = int(line[0])
    b = int(line[1])
    arr += [a] * b

arr = sorted(arr)
print arr[k-1]


Fixed submission:
def main():
    n, k = [int(x) for x in input().split(' ')]
    arr = [0] * 100001
    for _ in range(n):
        a, b = [int(x) for x in input().split(' ')]
        arr[a] += b
    foo = 0
    for i, e in enumerate(arr):
        foo += e
        if (foo >= k):
            print(i)
            break

main()
Buggy python submission (verdict: Runtime Error):
import math
h,w = map(int,input().split())
if h==1 or w==1:
  print(1)
else:
  nos = math.ceil(w/2)*math.ceil(h/2) + math.floor(w/2)*math.floor(h/2)
  print(nos)


Fixed submission:
a,b,c= map(int, input().split())
if ((a+c)==b*2):
 print('YES')
else:
 print('NO')

Buggy python submission (verdict: Runtime Error):
a=int(input("Enter the height a in meters="))
b=int(input("Enter the height b in meters="))
c=int(input("Enter the height c in meters="))
if(1<=a and 1<=b and 1<=c and a<=100 and b<=100 and c<=100):
    if(b-a==c-b):
        print("Yes")
        print('Since'+str(b)+ '-' +str(a)+ '=' +str(c)+ '-' +str(b)+ ',this arrangement of poles is beautiful.')
    elif(c-b==b-a):
        print("Yes")
        print('Since'+str(c)+ '-' +str(b)+ '=' +str(b)+ '-' +str(a)+ ',this arrangement of poles is beautiful.')
    else:
        print("NO")
        print('Since'+str(b)+ '-' +str(a)+ '≠' +str(c)+ '-' +str(b)+ ',this arrangement of poles is not beautiful.')


Fixed submission:
a,b,c= map(int, input().split())
if ((a+c)==b*2):
 print('YES')
else:
 print('NO')

Buggy python submission (verdict: Runtime Error):
a=int(input("Enter a"))
b=int(input("Enter b"))
c=int(input("Enter c"))
if a-b == b-c || b-a == c-b:
 print(Beautiful")
else:
 print("No")

Fixed submission:
a,b,c= map(int, input().split())
if ((a+c)==b*2):
 print('YES')
else:
 print('NO')

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

beautiful()

Fixed submission:
a,b,c= map(int, input().split())
if ((a+c)==b*2):
 print('YES')
else:
 print('NO')

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

beautiful()

Fixed submission:
a,b,c= map(int, input().split())
if ((a+c)==b*2):
 print('YES')
else:
 print('NO')

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

beautiful()

Fixed submission:
a,b,c= map(int, input().split())
if ((a+c)==b*2):
 print('YES')
else:
 print('NO')

Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
if(abs(a-b)==abs(b-c)):
    print("Yes")
else:
    print("No")


Fixed submission:
a,b,c= map(int, input().split())
if ((a+c)==b*2):
 print('YES')
else:
 print('NO')