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

Fixed submission:
import math

n = int( input())

print( math.ceil(n/2) * math.floor(n/2))

Buggy submission (verdict: Runtime Error):
n=int(input())
if n>=2 and n<=100:
    if n%2==0:
        print( (n/2)^2)
    else:
        print( ((n//2)+1)^2)

Buggy submission (verdict: Runtime Error):
N =int(input())
if N%2==1:
    odd = N-even
else:
    even = N/2
    odd = N/2
print(int(even*odd))

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

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

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

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

Buggy submission (verdict: Runtime Error):
k = map(int, input())
if k%2 == 0:
    print((k/2)*(k/2))

else:
    print(((k-1)/2)*(((k-1)/2)-k))
Problem p03288 (python)

Fixed submission:
rating = int(input())
if(rating>=0 and rating<1200):
  print("ABC")
elif(rating < 2800):
  print("ARC")
elif(rating <= 4208):
  print("AGC")

Buggy submission (verdict: Runtime Error):
rating = int(input())
switch(rating):
  case rating>0 and rating < 1200:
    print("ABC")
    break
  case rating > 1200 and rating < 2800:
    print("ARC")
    break
  case rating > 2800 :
    print("AGC")
    break
  default:
    print("ERROR")
    break
Problem p03293 (python)

Fixed submission:
S = input()
T = input()

for _ in range(len(S)):
    if S == T:
        print('Yes')
        break
    else:
        S = S[-1] + S[:-1]
else:
    print('No')

Buggy submission (verdict: Runtime Error):


#if WATCH_RUNTIME
	#include <ctime>
	clock_t startTime;
#endif

#include <cstdio>
#include <cstring>

int main(void)
{
	#if DEBUG 
	freopen("_in","r",stdin);
	#endif
	#if WATCH_RUNTIME
	startTime=clock();
	#endif
	bool winFlag;
	int i,j,N;
	char msg[200],patten[100];
	scanf("%s",msg);
	scanf("%s",patten);
	N=strlen(msg);
	for(i=0;i<N;i++)
	{
		msg[N+i]=msg[i];
	}
	msg[N+i]='\0';
	for(i=0;i<N;i++)
	{
		winFlag=true;
		for(j=0;patten[j];j++)
		{
			if(patten[j]!=msg[i+j])
			{
				winFlag=false;
				break;
			}
		}
		if(winFlag)
			break;
	}
	printf("%s\n",winFlag?"Yes":"No");

	#if WATCH_RUNTIME
	printf("----------\n");
	printf("\n+===============+\n");
	printf("|RUNTIME =%3dms.|\n",clock()-startTime);
	printf("+===============+\n");
	#endif

	return 0;
}
Problem p03294 (python)

Fixed submission:
n = input()
a = input().split()
b = []
for i in a :
    b.append(int(i));
c = 0
for i in b :
    c += i-1
print(c)

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3

from math import *

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

n = int(input())
A = [int(x) for x in input().split()]
m = 1
for i in A:
    m = lcm(i,m)

m -= 1
ans = 0
for i in A:
    ans += m%i

print(ans)
Problem p03323 (python)

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

if a > 8 or b > 8:
    print(':(')
else:
    print('Yay!')

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
if(a + b > 16):
    print(":(")
elif(a <= 8 and b <= 8):
    print("Yay!")
else:
    print(":(")
Problem p03324 (python)

Fixed submission:
d,n = map(int,input().split())
for i in range (n):
    ans=100 ** d * (i+1)
if n==100:
    ans+=100 ** d
print(ans)

Buggy submission (verdict: Runtime Error):
d = int(input("Digite um numero sendo ele 0, 1 ou 2"))
n = int(input("Digite um numero de 0 a 100"))

if (d == 0):
    x = 1
    y = 0
    n0 = []
    while ( x <= n ):
        n0.append(y)
        x = x + 1
        y = y + 1
    print(n0[-1])
elif (d == 1):
    x = 1
    y = 100
    n1 = []
    while (x <= n ):
        n1.append(y)
        x = x + 1
        y = y + 100
    print(n1[-1])
elif (d == 2):
    x = 1
    y = 1000
    n2 = []
    while (x <= n):
        n2.append(y)
        x = x + 1
        y = y + 1000
    print(n2[-1])
Problem p03325 (python)

Fixed submission:
n = int(input())
a = map(int, input().split())
 
cont = 0
 
for e in a:
    x = e
    while x % 2 == 0:
        x /= 2
        cont += 1
 
print(cont)

Buggy submission (verdict: Runtime Error):
def meu_map(l):
    for i in range(len(l)):
        l[i] = int(l[i])


n = int(raw_input())
array = raw_input().split()

meu_map(array)

fatores = 0
for e in array:
    while e != 1:
        if e % 2 == 0:
            e /= 2
            fatores += 1
        else:
            break

print(fatores)
Problem p03331 (python)

Fixed submission:
def sum_value(n):
    n = str(n)
    sum = 0
    for i in range(len(n)):
        sum+=int(n[i])
    return sum

N = int(input())
A = int(N/2)
B = int(N/2) if N%2 == 0 else int(N/2)+1
menor = -1
for i in range(int(N/2)):
    menor = sum_value(A+i)+sum_value(B-i) if menor < 0 else min(sum_value(A+i)+sum_value(B-i), menor) 
print(menor)

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


x = n - 2
y = n - x

if n < 10:
    print(n)
if n = 10:
    print(1)
else:
    resulty, resultx = 0, 0

    while(x > 0):
        resultx += x % 10
        x = x // 10

    while(y > 0):
        resulty += y % 10
        y = y // 10

    #print(resulty+resultx)
    z = n//2

    result = 0
    while(z > 0):
        result += z % 10
        z = z // 10

    if result*2 < resulty+resultx:
        print(result*2)
    else:
        print(resulty+resultx)
Problem p03337 (python)

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

Buggy submission (verdict: Runtime Error):
a, b = map(int, sys.stdin.readline().strip)
sys.stdout.write(max(a+b, a-b, a*b) + '\n')

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

Fixed submission:
a, b, c = map(int, input().split())
k = int(input())
if a >= b and a >= c:
	print(a * 2 ** k + b + c)
elif b >= a and b >= c:
	print(b * 2 ** k + a + c)
else:
	print(c * 2 ** k + b + a)

Buggy submission (verdict: Runtime Error):
line = input()
A, B, X = [int(u) for u in line.split()]
u=[A,B,C]
j = max(u)
u.remove(j)
u.append(j*2**K)
print(sum(u))
Problem p03437 (python)

Fixed submission:
b=[]
b = input().strip().split()
b[0]=int(b[0])
b[1]=int(b[1])
if b[0]%b[1]==0:
	print("-1")
else:
	print(b[0])

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

Fixed submission:
X = int(input())
A = int(input())
B = int(input())

P = X-A
PT = P % B
print(PT)

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
#CODE
u=a-b
v=u//c
w=v*c
left=u-w
print(left)
.

Buggy submission (verdict: Runtime Error):
// code 
x=int(input())
y=int(input())
z=int(input())
left=x-y
print(left%z)

Buggy submission (verdict: Runtime Error):
a=input()
b=input()
c=input()
left=a-b
result=left%c
print(result)

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

print((y-y1)%y2
Problem p03448 (python)

Fixed submission:
a=int(input())
b=int(input())
c=int(input())
x=int(input())
x=int(x/50)
p=0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if 10*i + 2*j + k == x:
                p=p+1


print(p)

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
x = int(input())
 
 result= 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:
                result += 1
 
print(result)
Problem p03449 (python)

Fixed submission:
#input template
from sys import stdin, stdout
cin = stdin.readline
cout = stdout.write
mp = lambda: list(map(int, cin().split()))

def chars(): #function for taking string input as character array since string in python is immutable
    s = cin()
    return(list(s[:len(s) - 1]))

#print list	
def pl(a):	
	for val in a:
		cout(str(val) + ' ')
	cout('\n')
		
#main

n, = mp()
a = mp()
b = mp()

x = sum(b)
ans = a[0] + x
temp = ans
for i in range(1, n):
	temp += a[i] - b[i-1]
	ans = max(ans, temp)
cout(str(ans))

Buggy submission (verdict: Runtime Error):
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
#include<assert.h>
#include<numeric>
#include<stdio.h>
#include <cstdint>
#include <stdlib.h>
#include <time.h>
using namespace std;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
#define rrep(i,n) REP(i,1,n+1)
#define all(a) a.begin(), a.end()
#define fi first
#define se second
#define RNG(x, a, n) &((x)[a]), &((x)[n])
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
typedef long long ll;
typedef pair<ll, ll> Pll;
typedef pair<int, int> PII;
typedef vector<ll> Vl;
typedef vector<int> VI;
typedef tuple<int, int, int> TT;
#define chmin(x,y) x = min(x,y)
#define chmax(x,y) x = max(x,y)
#define rall(v) v.rbegin(), v.rend()
#define dmp(x,y) make_pair(x,y)
#define dmt(x, y, z) make_tuple(x, y, z)
#define pb(x) push_back(x)
#define pf(x) push_front(x)
const int MAX = 2000000;
const int inf = 1000000007;
const ll mod = 1000000007;
const ll longinf = 1LL << 60;
const long double PI = (acos(-1));
const long double EPS = 0.0000000001;
 
int dx[4] = { 1, 0, -1, 0 };
int dy[4] = { 0, 1, 0, -1 };
 
 
 
int n, ans;
int a[2][100005];
 
int main() {
 
cin >> n;
 
rep(i, 2) {
rrep(j, n) {
int tmp;
cin >> tmp;
a[i][j] = a[i][j - 1] + tmp;
}
}
 
rrep(i, n) {
ans = max(ans, a[0][i] + (a[1][n] - a[1][i - 1]));
}
 
cout << ans << endl;
 int heath=4;
return 0;
}
Problem p03481 (python)

Fixed submission:
from math import log
a,b = input().split()
a = eval(a)
b = eval(b)
cnt = 0
while a <= b:
	cnt += 1
	a *= 2
print(cnt)

Buggy submission (verdict: Runtime Error):
X,Y = map(int,input())
ans = 0
while X <= Y:
	ans += 1
	X * = 2
print(ans)
Problem p03487 (python)

Fixed submission:
from collections import Counter
a = int(input())
l = list(map(int, input().split()))
#i = 1

c=Counter(l)
d = dict(c)
kv = []
for k,v in d.items():
    if k>v:
        kv.append(v)
    elif k<v:
        t = v-k
        kv.append(t)
s = sum(kv)
print(s)

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

line1 = int(input())
line2 = str(input()).split(" ")
keepTrack = dict()
keys = []
keys = list(set(line2))
for element in keys:
    keepTrack[element] = line2.count(element)

sum = 0
for key in keys:
    ##sum += abs()
    if (key < keepTrack[key]):
        sum += -key + keepTrack[key]
    elif (key > keepTrack[key]):
        sum += keepTrack[key]
print(sum)

Buggy submission (verdict: Runtime Error):
from collections import Counter
a = int(input())
l = []
i = 1
for i in range(a):
    b = [int(i) for i in input(i).split(" ")]
    l.append(b)
c=Counter(l)
d = dict(c)
kv = []
for k,v in d.items():
    if k>v:
        kv.append(v)
    elif k<v:
        t = v-k
        kv.append(t)
s = sum(kv)
print(s)
Problem p03548 (python)

Fixed submission:
x,y,z=map(int,input().split())
print((x-z)//(y+z))

Buggy submission (verdict: Runtime Error):
x=int(input(""))
y=int(input(""))
z=int(input(""))
answer= (x-z)//(z+y)
print(answer)
exit()
Problem p03555 (python)

Fixed submission:
s = input()
r = input()
s = s + r
r = ''.join(reversed(s))
if s == r:
    print("YES")
else: print("NO")

Buggy submission (verdict: Runtime Error):
a= (input()) 
b=(input()) 
if(a[0]==b[2] &&a[1] ==b[1] && a[2] ==b[0] ):
       print("Yes")
else:
        print ("No" )
Problem p03556 (python)

Fixed submission:
import math
n = int(input())
s = int(math.sqrt(n))
print(s**2)

Buggy submission (verdict: Runtime Error):
a=int(input())
for i in range(1,a+1):
    if(i*i)>a:
        j=i-1
        break;
        
print(j*j);
Problem p03573 (python)

Fixed submission:
x,y,z=input().split()
x,y,z=int(x),int(y),int(z)
if x==y:
        print(z)
elif x==z:
        print(y)
elif y==z:
        print(x)

Buggy submission (verdict: Runtime Error):
a=int(input("enter a"))
b=int(input("enter b"))
c=int(input("enter c"))
if a<=100 and a>=-100 and b<=100 and b>=-100 and c<=100 and c>=-100:
    if a==b:
        print(c)
    elif a==c:
        print(b)
    elif c==b:
        print(a)
Problem p03574 (python)

Fixed submission:
inp = input().split(" ")
h = int(inp[0])
w = int(inp[1])

grid = []

for i in range(h):
	grid.append(list(input()))

for i in range(h):
	for j in range(w):
		c = grid[i][j]
		if c == ".":
			total = 0
			adj = []
			if i > 0:
				adj.append(grid[i-1][j])
			if j > 0:
				adj.append(grid[i][j-1])
			if i < h-1:
				adj.append(grid[i+1][j])
			if j < w-1:
				adj.append(grid[i][j+1])
			if i > 0 and j > 0:
				adj.append(grid[i-1][j-1])
			if i > 0 and j < w-1:
				adj.append(grid[i-1][j+1])
			if i < h-1 and j > 0:
				adj.append(grid[i+1][j-1])
			if i < h-1 and j < w-1:
				adj.append(grid[i+1][j+1])
			for k in adj:
				if k == "#":
					total += 1
			grid[i][j] = str(total)

for i in grid:
	print("".join(i))

Buggy submission (verdict: Runtime Error):
print(2/0)

#  random shit  random shit  random shit  random shit  random shit  random shit
Problem p03625 (python)

Fixed submission:
n = int(input())
vals = list(map(int, input().split()))
d= {}
a = [0, 0]

for i in range(n):
    if(vals[i] in d.keys()):
        d[vals[i]] += 1
    else:
        d[vals[i]] = 1


for i in d.keys():
    if(d[i] >= 4):
        a.append(i)
        a.append(i)
    elif(d[i] >= 2):
        a.append(i)
a.sort()

print(a[-1]*a[-2])

Buggy submission (verdict: Runtime Error):
lst = []
N = int(input("Enter number of elements : "))
for i in range(0,N):
    lst.append(int(input()))
temp = [x for x in lst if lst.count(x)>1]
list_set = set(temp)
# convert the set to the list
dups = (list(list_set))
n=len(dups)
if (n<2):
   print('0\nNo rectangle can be formed')
else:
    a = dups[0]
    b = dups[1]
    for i in range(0, n):
      for j in range(i + 1, n):
        if (dups[i]*dups[j]>a*b):
             a = dups[i]
             b = dups[j]
    print(a*b)
    print(a,' times ',b,' rectangle can be formed')
Problem p03632 (python)

Fixed submission:
a,b,c,d=map(int,input().split())
print(max(0,min(b,d)-max(a,c)))

Buggy submission (verdict: Runtime Error):
a,b,c,d=map(int(),input().split())
print(max(0,min(a,c)-max(b,d))
Problem p03633 (python)

Fixed submission:
import fractions
import functools

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

n=int(input())
t=[]
for i in range(n):
	t.append(int(input()))
ans=functools.reduce(lcm,t)
print(ans)

Buggy submission (verdict: Runtime Error):
def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)
n = (input())
res = (input())
while n > 1:
	x = (input())
	res = (res * x) // gcd(res, x);
	n -= 1
print(res)
Problem p03635 (python)

Fixed submission:




a,b=map(int,input().split())
print((a-1)*(b-1))

Buggy submission (verdict: Runtime Error):
from sys import stdin, stdout


def main():
    line = stdin.readline()
    parts = line.split()
    n = int(parts[1])
    m = int(parts[2])
    stdout.write(str((n-1)*(m-1)))


main()
Problem p03676 (python)

Fixed submission:
mod = 10 ** 9 + 7

f = [0 for _ in range(200000)]
f[0] = 1
for i in range(1, 200000):
    f[i] = f[i - 1] * i % mod
inv = [pow(f[i], mod - 2, mod) for i in range(200000)]


def C(n, m):
    if n < m or m < 0: return 0
    return f[n] * inv[m] * inv[n - m] % mod

n = int(input())
a = list(map(lambda x: int(x) - 1, input().split()))
pos = [[] for _ in range(n)]

for idx, x in enumerate(a):
    pos[x].append(idx)

for _ in pos:
    if len(_) == 2:
        l, r = _

for i in range(1, n + 2):
    print(((C(n + 1, i) - C(n + l - r, i - 1)) % mod + mod) % mod)

Buggy submission (verdict: Runtime Error):
mod = 10 ** 9 + 7

f = [0 for _ in range(100000)]
f[0] = 1
for i in range(1, 100000):
    f[i] = f[i - 1] * i % mod
inv = [pow(f[i], mod - 2, mod) for i in range(100000)]


def C(n, m):
    if n < m: return 0
    return f[n] * inv[m] * inv[n - m]

n = int(input())
a = [*map(lambda x: int(x) - 1, input().split())]
pos = [[] for _ in range(n)]

for idx, x in enumerate(a):
    pos[x].append(idx)

for _ in pos:
    if len(_) == 2:
        l, r = _

for i in range(1, n + 2):
    print(((C(n + 1, i) - C(n + l - r, i - 1)) % mod + mod) % mod)

Buggy submission (verdict: Runtime Error):
mod = 10 ** 9 + 7

f = [0 for _ in range(100000)]
f[0] = 1
for i in range(1, 100000):
    f[i] = f[i - 1] * i % mod
inv = [pow(f[i], mod - 2, mod) for i in range(100000)]


def C(n, m):
    if n < m: return 0
    return f[n] * inv[m] * inv[n - m]

n = int(input())
a = [*map(lambda x: int(x) - 1, input().split())]
pos = [[] for _ in range(n)]

for idx, x in enumerate(a):
    pos[x].append(idx)

for _ in pos:
    if len(_) == 2:
        l, r = _

for i in range(1, n + 2):
    print(((C(n + 1, i) - C(n + l - r, i - 1)) % mod + mod) % mod)
Problem p03711 (python)

Fixed submission:
a = [1,2,1,0,1,0,1,1,0,1,0,1]    
x,y=map(int, input().split())
if(x==2 or y == 2):
  print("No")
  exit()
if(a[x-1] == a[y-1]):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
x = int(input())
y = int(input())
s1 = [1,3,5,7,8,10,12]
s2 = [4,6,9,11]
if x in s1 and y in s1:
    print("Yes")
elif x in s2 and y in s2:
    print("Yes")
elif x == 2 and y == 2:
    print("Yes")
else:
    print("No")
Problem p03712 (python)

Fixed submission:

n,m=map(int,input().split())
# print
# v=[]
for i in range(n+2):
    s=""
    if i==0 or i==n+1:
        s="#"*(m+2)
        
    else:
        a=input()
        s="#"+a+"#"
    print(s)
    # v.append(s)
    
    
# for i in v:
#     print(i)

Buggy submission (verdict: Runtime Error):

n,m=map(int,input().split())
# print
v=[]
for i in range(n+2):
    s=""
    if i==0 or i==n+1:
        s="#"*(m+2)
        
    else:
        a=input()
        s="#"+a+"#"
    v.append(s)
    
    
for i in v:
    print(i)
Problem p03721 (python)

Fixed submission:
x = raw_input().split(" ")
num_operations = int(x[0])
kth_integer = int(x[1])
field = {}
for p in range(0, num_operations):
 line = raw_input().split(" ")
 a = int(line[0])
 b = int(line[1])
 if a in field:
  field[a] += b
 else:
  field[a] = b
ks = field.keys()
ks.sort()
out = field.keys()[-1]
for k in ks:
 kth_integer -= field[k]
 if (kth_integer <= 0):
  out = k
  break
print (out)

Buggy submission (verdict: Runtime Error):
n = int(input())
k = int(input())
x = 0
y =0
sum = 0
for i in range(n):
    x=int(input())
    y = int(input())
    sum+=y
    if(k <= sum):
        print(x)
        break

Buggy submission (verdict: Runtime Error):
args = raw_input().split()
sarr = []
for i in range(int(args[0])):
        sarr.append(raw_input().split())

counter = 0
lim = int(args[1])

for i in sarr:
    counter += int(i[1])
    if(counter >= lim):
        print(int(i[0]))
        exit()
Problem p03759 (python)

Fixed submission:
a,b,c=map(int,input().split())
if b-a == c-b:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
for i in range(1,100):
    a=int(raw_input("Enter the height a in meters="))
    b=int(raw_input("Enter the height b in meters="))
    c=int(raw_input("Enter the height c in meters="))
    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.'

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

Buggy submission (verdict: Runtime Error):
for i in range(1,100):
    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(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.')

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

if b<a and b<c:
 print("No")
elif b-a==c-b:
 print("Yes")

Buggy submission (verdict: Runtime Error):
import math
a, b, c = input().split()
d = math.fabs(b-a)
e = math.fabs(c-b)
if d == e:
 print('YES')
else:
 print('NO')

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

beautiful()

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

beautiful()
Problem p03760 (python)

Fixed submission:
def solve():
    o = input()
    e = input()

    try:
        for i in range(max(len(o), len(e))):
            print(o[i], end='')
            print(e[i], end='')
    except:
        pass


if __name__ == "__main__":
    solve()

Buggy submission (verdict: Runtime Error):
O=[]
E=[]
P=[]
Olength=int(input("Enter the length of odd Characters")
for i in range (o,Olength):
 x=input("ENTER cHARACTERS")
 O.append(x)
Elength=int(input("Enter the length of even Characters")
for i in range (o,Elength):
 x=input("ENTER cHARACTERS")
 E.append(x)
for i in range (o,Olength):
 P.append(O[i])
 P.append(E[i])

for i in range (o, P.length):
 print(P[i])
Problem p03761 (python)

Fixed submission:
N = int(input())
s_list = []
s_set = []

for i in range(N):
	s_list.append(list(x for x in input()))

for i in s_list:
	s_set.append(set(i))

result_char = {x for x in 'qwertyuiopasdfghjklzxcvbnm'}

for i in range(N-1):
	result_char = (s_set[i] & s_set[i+1] & result_char)

result_char = list(result_char)
result_char.sort()

result = ''
for i in result_char:
	count = min(x.count(i) for x in s_list)
	result += i*count
print(result)

Buggy submission (verdict: Runtime Error):
n = int(input())
alp = [chr(i) for i in range(97, 97+26)]
ans = []
for i in range(n):
    a = list(input())
    a.sort()
    if i == 0:
        ans = a
    else:
        k = 0
        if len(a) >= len(ans):
            while k < len(a):
                if k >= len(ans):
                    break
                if a[k] < ans[k]:
                    del a[k]
                elif a[k] == ans[k]:
                    k += 1
                elif a[k] > ans[k]:
                    del ans[k]
        else:
            while k < len(ans):
                if k >= len(a):
                    del ans[k]
                    k += 1
                if a[k] < ans[k]:
                    del a[k]
                elif a[k] == ans[k]:
                    k += 1
                elif a[k] > ans[k]:
                    del ans[k]

for i in ans:
    print(i, end="")