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

Fixed submission:
if __name__ == '__main__':
    N = int(input().rstrip())
    print(800 * N - 200 * (N // 15))

Buggy submission (verdict: Runtime Error):
SHEEP = True
WOLF = False


def print_tree(tree):
    print(''.join(['S' if e else 'W' for e in tree]))


def calc_next_animal(tree, cur_pos):
    if answer[cur_pos]:
        if tree[cur_pos] == SHEEP:
            return tree[cur_pos - 1]
        else:
            return not tree[cur_pos - 1]
    else:
        if tree[cur_pos] == SHEEP:
            return not tree[cur_pos - 1]
        else:
            return tree[cur_pos - 1]


def calc_prev_animal(tree, cur_pos):
    if answer[cur_pos]:
        if tree[cur_pos] == SHEEP:
            return tree[cur_pos + 1]
        else:
            return not tree[cur_pos + 1]
    else:
        if tree[cur_pos] == SHEEP:
            return not tree[cur_pos + 1]
        else:
            return tree[cur_pos + 1]


def wfs(tree, cur_pos, N):
    tree[cur_pos + 1] = calc_next_animal(tree, cur_pos)
    cur_pos += 1
    if cur_pos == N - 1:
        return tree[0] == calc_next_animal(tree, cur_pos) and tree[cur_pos] == calc_prev_animal(tree, 0)
    else:
        return wfs(tree, cur_pos, N)


if __name__ == '__main__':
    N = int(input())
    answer = [True if i == 'o' else False for i in input().rstrip()]
    aa = [[WOLF, WOLF]
        , [WOLF, SHEEP]
        , [SHEEP, SHEEP]
        , [SHEEP, WOLF]]
    super_list = [0] * int(2E5)
    for a in aa:
        super_list[:2] = a
        if wfs(super_list, 1, N):
            print_tree(super_list[:N])
            break
    else:
        print(-1)
Problem p03807 (python)

Fixed submission:
N = input()
if len([a for a in input().rstrip().split() if int(a) % 2]) % 2:
    print('NO')
else:
    print('YES')

Buggy submission (verdict: Runtime Error):
N = input()
if len([a for a in input().rstrip().split() if a % 2]) % 2:
    print('NO')
else:
    print('YES')
Problem p04029 (python)

Fixed submission:
N = int(input())
print(int(N * (N + 1) / 2))

Buggy submission (verdict: Runtime Error):
N = input()
print(N * (N + 1) / 2)
Problem p03262 (python)

Fixed submission:
import fractions
n, fx = map(int, input().split())
x = list(map(int, input().split()))
x.append(fx)
x.sort()

ans = x[1]-x[0]
for i in range(2, len(x)):
  v = x[i]-x[i-1]
  ans = fractions.gcd(ans, v)

print(ans)

Buggy submission (verdict: Runtime Error):
import math
n, fx = map(int, input().split())
x = list(map(int, input().split()))
x.append(fx)
x.sort()

ans = x[1]-x[0]
for i in range(2, len(x)):
  v = x[i]-x[i-1]
  ans = max(ans, math.gcd(ans, v))

print(ans)
Problem p03369 (python)

Fixed submission:
S = input()
S = S.replace('x','')
len_S =len(S)
print(len_S * 100 + 700)

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

x = [None]*N
rev_x = [None]*N
v = [None]*N

T = [None]*N
Trev = [None]*N

Tall = []

for i in range(N):
    a,b = list(map(int,input().split()))
    x.append(a)
    rev_x.append(C - a)
    v.append(b)

rev_x.reverse()

for i in range(N):
    T.append(sum(v[0:i+1]) - x[i])

v.reverse()

for i in range(N):
    Trev.append(sum(v[0:i+1]) - rev_x[i])

Tall = T + Trev

for i in range(N):
    for j in range(N - i - 1):
        Tall.append(T[i] + Trev[j] - min(x[i], rev_x[j]))

Tmax = max(Tall)
if Tmax < 0:
    Tmax = 0
print(Tmax)
Problem p03257 (python)

Fixed submission:
z=int(input())
n=500

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

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

def lcm3(a,b,c):
	return lcm(lcm(a,b),c)

def lcm4(a,b,c,d):
	return lcm(lcm(a,b),lcm(c,d))

a=[0]*(n*n)
x=set([1])
for i in range(n*n//4)[::-1]:
	j=i//((n*n)//16)
	if j==0:
		y1=0
		y2=0
	elif j==1:
		y1=1
		y2=1
	elif j==2:
		y1=0
		y2=1
	else:
		y1=1
		y2=0
	k=i%((n*n)//16)
	m=i+2
	a[n*(4*(k//(n//4))+2*y1)+4*(k%(n//4))+2*y2]=m
	x.add(m)
	while m in x:
		m+=i+2
	a[n*(4*(k//(n//4))+2*y1+1)+4*(k%(n//4))+2*y2+1]=m
	x.add(m)
#print(a)
for i in range(0,n*n):
	if a[i]==0:
		j=i//n
		k=i%n
		if j==0 and k==n-1:
			m=lcm(a[i-1],a[i+n])
			l=m+1
			while l in x:
				l+=m
			a[i]=l
			x.add(l)
		elif j==n-1 and k==0:
			m=lcm(a[i+1],a[i-n])
			l=m+1
			while l in x:
				l+=m
			a[i]=l
			x.add(l)
		elif j==0:
			m=lcm3(a[i-1],a[i+1],a[i+n])
			l=m+1
			while l in x:
				l+=m
			a[i]=l
			x.add(l)
		elif j==n-1:
			m=lcm3(a[i-1],a[i+1],a[i-n])
			l=m+1
			while l in x:
				l+=m
			a[i]=l
			x.add(l)
		elif k==0:
			m=lcm3(a[i+1],a[i-n],a[i+n])
			l=m+1
			while l in x:
				l+=m
			a[i]=l
			x.add(l)
		elif k==n-1:
			m=lcm3(a[i-1],a[i-n],a[i+n])
			l=m+1
			while l in x:
				l+=m
			a[i]=l
			x.add(l)
		else:
			m=lcm4(a[i+1],a[i-1],a[i-n],a[i+n])
			l=m+1
			while l in x:
				l+=m
			a[i]=l
			x.add(l)

#print(max(x))

for i in range(z):
	print(' '.join(map(str,a[i*n:i*n+z])))

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

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

def lcm3(a,b,c):
	return lcm(lcm(a,b),c)

def lcm4(a,b,c,d):
	return lcm(lcm(a,b),lcm(c,d))

a=[0]*(n*n)
x=set([1])
s=2
for i in range(0,n*n):
	if (i//n+i%n)%2==0:
		a[i]=s
		x.add(s)
		s+=1
#print(a)
for i in range(0,n*n):
	if a[i]==0:
		j=i//n
		k=i%n
		if j==0 and k==n-1:
			m=lcm(a[i-1],a[i+n])
			l=m+1
			while l in x:
				l+=m
			a[i]=l
			x.add(l)
		elif j==n-1 and k==0:
			m=lcm(a[i+1],a[i-n])
			l=m+1
			while l in x:
				l+=m
			a[i]=l
			x.add(l)
		elif j==0:
			m=lcm3(a[i-1],a[i+1],a[i+n])
			l=m+1
			while l in x:
				l+=m
			a[i]=l
			x.add(l)
		elif j==n-1:
			m=lcm3(a[i-1],a[i+1],a[i-n])
			l=m+1
			while l in x:
				l+=m
			a[i]=l
			x.add(l)
		elif k==0:
			m=lcm3(a[i+1],a[i-n],a[i+n])
			l=m+1
			while l in x:
				l+=m
			a[i]=l
			x.add(l)
		elif k==n-1:
			m=lcm3(a[i-1],a[i-n],a[i+n])
			l=m+1
			while l in x:
				l+=m
			a[i]=l
			x.add(l)
		else:
			m=lcm4(a[i+1],a[i-1],a[i-n],a[i+n])
			l=m+1
			while l in x:
				l+=m
			a[i]=l
			x.add(l)

for i in range(n):
	print(' '.join(map(str,a[i*n:i*n+n])))
Problem p03555 (python)

Fixed submission:

a=input()
d=input()

if a[2]==d[0] and a[1]==d[1] and a[0]==d[2]:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
a=input()
d=input()

if a[2]==d[0] and a[1]==d[1] and a[0]==d[2]:
    print("YES")
else:
    NO
Problem p03261 (python)

Fixed submission:
n=int(input())
w=[]
flag=True
for i in range(n):
    w.append(input())
    
for i in range(n-1):
    if w[i][-1]!=w[i+1][0]:
        #print(i,"out1")
        flag=False

for i in range(n-1):
    for j in range(i+1,n):
        if(w[i]==w[j]):
            #print(i,j,"out2")
            flag=False

if flag==True:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
flag=True
for i in range(n):
    w.append(input())
    
for i in range(n-1):
    if w[i][-1]!=w[i+1][0]:
        #print(i,"out1")
        flag=False

for i in range(n-1):
    for j in range(i+1,n):
        if(w[i]==w[j]):
            #print(i,j,"out2")
            flag=False

if flag==True:
    print("Yes")
else:
    print("No")
Problem p03262 (python)

Fixed submission:
import fractions
from functools import reduce
n,s=map(int,input().split())
x=list(map(int,input().split()))
#print(x)

for i in range(n):
    x[i]=abs(x[i]-s)

print(reduce(fractions.gcd,x))

Buggy submission (verdict: Runtime Error):
import math
from functools import reduce
n,s=map(int,input().split())
x=list(map(int,input().split()))
#print(x)

for i in range(n):
    x[i]=abs(x[i]-s)

gcd=reduce(math.gcd,x)

print(gcd)

Buggy submission (verdict: Runtime Error):
import math
from functools import reduce
n,s=map(int,input().split())
x=list(map(int,input().split()))
#print(x)

for i in range(n):
    x[i]=abs(x[i]-s)

gcd=reduce(math.gcd,x)

print(gcd)

Buggy submission (verdict: Runtime Error):
import math

n,s=map(int,input().split())
x=list(map(int,input().split()))
ans=0
#print(x)

for i in range(n-1):
    ans=math.gcd(abs(x[i]-s),abs(x[i+1]-s))

print(ans)
Problem p03273 (python)

Fixed submission:
import numpy as np
h,w=map(int,input().split())
"""
入力はスペースなしだった
文字列としてリストの行にぶち込む必要あり
icon=list()
for i in range(h):
    icon.append(list(input().split()))

"""
icon=[''] * h
for i in range(h):
    icon[i]=input()


row=[False]*h
col=[False]*w

for i in range(h):
    for j in range(w):
        if icon[i][j]=='#':
            row[i]=True
            col[j]=True

for  i in range(h):
    if row[i]==True:
        for j in range(w):
            if col[j]==True:
                print(icon[i][j],end='')
        print()

Buggy submission (verdict: Runtime Error):
import numpy as np
h,w=map(int,input().split())
"""
入力はスペースなしだった
文字列としてリストの行にぶち込む必要あり
icon=list()
for i in range(h):
    icon.append(list(input().split()))

"""
icon=[''] * h
for i in range(h):
    a[i]=input()


row=[False]*h
col=[False]*w

for i in range(h):
    for j in range(w):
        if icon[i][j]=='#':
            row[i]=True
            col[j]=True

for  i in range(h):
    if row[i]==True:
        for j in range(w):
            if col[j]==True:
                print(icon[i][j],end='')
        print()

Buggy submission (verdict: Runtime Error):
import numpy as np
h,w=map(int,input().split())
icon=list()
for i in range(h):
    icon.append(list(input().split()))

row=[False]*h
col=[False]*w

for i in range(h):
    for j in range(w):
        if icon[i][j]=='#':
            row[i]=True
            col[j]=True

for  i in range(h):
    if row[i]==True:
        for j in range(w):
            if col[j]==True:
                print(icon[i][j],end='')
        print()
Problem p03284 (python)

Fixed submission:
n,k=map(int,input().split())
if(n%k==0):
    print("0")
else:
    print("1")

Buggy submission (verdict: Runtime Error):
n=int(input())
flag=False
for i in range(int(n/4)+1):
    for j in range(int(n/7)+1):
        if(i*4+j*7==n):
            flag=True

if(flag==True):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
n=int(input())
flag=False
for i in range(int(n/4)):
    for j in range(int(n/7)):
        if(i*4+j*7==n):
            flag=True

if(flag==True):
    print("Yes")
else:
    print("No")
Problem p03285 (python)

Fixed submission:
n=int(input())
flag=False
for i in range(int(n/4)+1):
    for j in range(int(n/7)+1):
        if(i*4+j*7==n):
            flag=True

if(flag==True):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
n=int(input())
for i in range(n/4):
    for j in range(n/7):
        if(i*4+j*7==n):
            flag=True

if(flag==True):
    print("Yes")
else:
    print("No")
Problem p03323 (python)

Fixed submission:
a,b = map(int,input().split())
#if((a<0 or a>16) or (b<0 or b>16) or (a+b>16)):
    #print("error\n")
count=16
flag=False
pic=0 # 0=a,1=b
while(count>0):
    if(pic==0):
        a-=1
        count-=1
        pic=1    
    elif(pic==1):
        pic=0
        b-=1
        count-=1
    if(a<=0 and b<=0):
        flag=True
        break
if(flag==True):
    print("Yay!")
else:
    print(":(")

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
#print(n)
#print(a)
count=0
flag=True
while(flag):
    flag=False
    for i in range(n):
        if(a[i]%2==0):
            #print(i)
            #a=list(map(lambda x:x*3,a))
            a[i]=int(a[i]/2)
            #print(a)
            count+=1
            flag=True
            break
print(count)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
#print(n)
#print(a)
count=0
i=0
flag=True
while(flag):
    flag=False
    for i in range(n):
        if(flag==True):
            a[i]=a[i]*3
        elif(a[i]%2==0):
            #print(i)
            a[i]=a[i]/2
            count+=1
            flag=True
        else:
            a[i]=a[i]*3
print(count)
Problem p03325 (python)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
#print(n)
#print(a)
count=0
flag=True
while(flag):
    flag=False
    for i in range(n):
        while(a[i]%2==0):
            #print(i)
            #a=list(map(lambda x:x*3,a))
            a[i]=int(a[i]/2)
            #print(a)
            count+=1
            flag=True
            #break
print(count)
#たぶんリスト全部に3かけて該当を６で割ればよさそう
#３倍する必要がない

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
#print(n)
#print(a)
count=0
flag=True
while(flag):
    flag=False
    for i in range(n):
        if(a[i]%2==0):
            #print(i)
            #a=list(map(lambda x:x*3,a))
            a[i]=int(a[i]/2)
            print(a)
            count+=1
            flag=True
            break
print(count)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
#print(n)
#print(a)
count=0
i=0
flag=True
while(flag):
    flag=False
    for i in range(n):
        if(flag=True):
            a[i]=a[i]*3
        elif(a[i]%2==0):
            #print(i)
            a[i]=a[i]/2
            count+=1
            flag=True
        else:
            a[i]=a[i]*3
print(count)
Problem p03261 (python)

Fixed submission:
n = int(input())
w=[]
for i in range(n):
    w.append(input())
a=0
for i in range(1,n):
    if w.count(w[i])==1 and w[i-1][-1]==w[i][0]:
       a += 1
    else:
        print('No')
        break
    if a==n-1:
        print('Yes')
    else:
        pass

Buggy submission (verdict: Runtime Error):
n = int(input())
*w, = open(0).read().split()
for i in range(1,n):
  if w.count(w[i]) > 1 or w[i-1][-1] == w[i][0]:
    print('No')
    break
  else: 
    print('Yes')

Buggy submission (verdict: Runtime Error):
n = int(input())
*w, = open(0).read().split()
for i in range(1,n):
  if w.count(w[i])==1 and w[i-1][-1] == w[i][0]:
    pass
  else:
    print('No')
    break
  if i == n-1:
    print('Yes)

Buggy submission (verdict: Runtime Error):
n = int(input())
*w,=open(0).read().split()
for i in range(1,n):
  if w.count(w[i]) == 1 and w[i-1][-1] == w[i][0]:
    pass
  else:
    print('No')
    break
  if i == n-1:
    print('Yes')
  else:
    pass
Problem p03433 (python)

Fixed submission:
N = int(input())
A = int(input())
if(N % 500 <= A):
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
A = int(input())
if(N % 500 =< A):
    print('Yes')
else:
    print('No')
Problem p03260 (python)

Fixed submission:
def func():
    a,b = map(int,input().split())
    if a & 1 == 1 and b & 1 == 1:
        print("Yes")
    else:
        print("No")
func()

Buggy submission (verdict: Runtime Error):
import fractions
from functools import reduce
def func():
    n,x0 = map(int,input().split())
    x = [int(i) for i in input().split()]
    x.append(x0)
    x.sort()
    x.reverse()
    
    l = []
    before = 0
    before = None
    for xi in x:
        if before == None:
            before = xi
            continue
        l.append(xi-before)
        before = xi
    
    print(abs(reduce(fractions.gcd,l)))
func()
Problem p03262 (python)

Fixed submission:
import fractions
from functools import reduce
def func():
    n,x0 = map(int,input().split())
    x = [int(i) for i in input().split()]
    x.append(x0)
    x.sort()
    x.reverse()
    
    l = []
    before = 0
    before = None
    for xi in x:
        if before == None:
            before = xi
            continue
        l.append(xi-before)
        before = xi
    
    print(abs(reduce(fractions.gcd,l)))
func()

Buggy submission (verdict: Runtime Error):
import math
from functools import reduce
def func():
    n,x0 = map(int,input().split())
    x = [int(i) for i in input().split()]
    x.append(x0)
    x.sort()
    x.reverse()
    
    l = []
    before = 0
    before = None
    for xi in x:
        if before == None:
            before = xi
            continue
        l.append(xi-before)
        before = xi
    
    print(reduce(math.gcd,l))
func()
Problem p03338 (python)

Fixed submission:
N = int(input())
S = list(input())

ans = 0
for i in range(1, N):
    left = set(S[:i])
    right = set(S[i:])
    both = left & right
    ans = max(len(both), ans)


print(ans)

Buggy submission (verdict: Runtime Error):
N = input()
S = list(input())

ans = 0
for i in range(1, N):
    left = set(S[:i])
    right = set(S[:i])

    both = left & right
    ans = max(len(both), ans)


print(ans)
Problem p03719 (python)

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

if c >= a and c <= b:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
N, M = list(map(int, input().split()))
a = []
b = []
c = []

for i in range(M):
    a_i, b_i, c_i = list(map(int, input().split()))
    a.append(a_i)
    b.append(b_i)
    c.append(c_i)


cost = [-float('inf') for i in range(N)]
cost[0] = 0
flag = True

while flag:
    for k in range(M):
        cost[b[k] - 1] = max(cost[b[k] - 1], cost[a[k] - 1] + c[k])
        if k == M - 2:
            flag = False

def check():
    for k in range(M):
        if cost[b[k] - 1] < cost[a[k] - 1] + c[k]:
            return 'inf'
    return cost[N - 1]




print(check())
Problem p03773 (python)

Fixed submission:
a, b = map(int, input().split())
c = (a + b) % 24
print(c)

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
stu = []
check = []
for i in range(n):
    stu.append(list(map(int, input().split())))

for i in range(m):
    check.append(list(map(int, input().split())))


ans = []

for i in range(n):
    dist = []
    for j in range(m):
        tmp = abs(stu[i][0] - check[j][0]) + abs(stu[i][1] - check[j][1])
        dist.append(tmp)
    mi = dist.index(min(dist))
    ans.append(mi)


for i in range(len(ans)):
    print(ans[i] + 1)

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
stu = []
check = []
for i in range(n):
    stu.append(list(map(int, input().split())))

for i in range(m):
    check.append(list(map(int, input().split())))


ans = []

for i in range(n):
    dist = []
    for j in range(m):
        tmp = abs(stu[i][0] - check[j][0]) + abs(stu[i][1] - check[j][1])
        dist.append(tmp)
    mi = dist.index(min(dist))
    ans.append(mi)


for i in range(len(ans)):
    print(ans[i] + 1)

Buggy submission (verdict: Runtime Error):
a, b = input().split()
c = (a + b) % 24
print(c)
Problem p03261 (python)

Fixed submission:
n = int(input())
words = []
 
for i in range(n):
  word = input()
  if i >= 1:
    if word in words or word[0] != words[-1][-1]:
      print('No')
      break
      
  words.append(word)

else:
  print('Yes')

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

for i in range(n):
  word = input()
  if i >= 1:
    if word in words or word[1] != before_word[-1]:
      print('No')
      break
  before_word = word
  words.append(word)

else:
  print('Yes')

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

for i in range(n):
  word = input()
  if i >= 1 :
    if word[1] != before_word[-1]:
      print('No')
      break
      
  before_word = word
  
else:
  print('Yes')
Problem p03262 (python)

Fixed submission:
n, place = [int(x) for x in input().split(' ')]
city_address = sorted([abs(int(x) - place) for x in input().split(' ')], reverse=True)
def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x % y)

answer = city_address[0]
for address in city_address:
	answer = gcd(answer, address)

print(answer)

Buggy submission (verdict: Runtime Error):
n, place = [int(x) for x in input().split(' ')]
city_address = [int(x) - place for x in input().split(' ')]

def gcd(x, y):
	if y == 0:
        return x
    else:
        return gcd(y, x % y)

answer = city_address[0]
for address in city_address:
	answer = gcd(answer, address)

print(answer)
Problem p03448 (python)

Fixed submission:
A = int(input())
B = int(input())
C = int(input())
X = int(input())
count = 0
for a in range(A+1):
    for b in range(B+1):
        for c in range(C+1):
            if 500*a+100*b+50*c==X:
                count += 1
print(count)

Buggy submission (verdict: Runtime Error):
A, B, C, X = map(int, input().strip().split())
count = 0

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

Fixed submission:
if __name__=="__main__":
    rgb = raw_input().split()
    num = int("".join(rgb))
    if num%4==0:
        print "YES"
    else:
        print "NO"

Buggy submission (verdict: Runtime Error):
N = int(raw_input())
S = raw_input()
t = S

print
print S
while S.count("()") != 0:
    S = S.replace("()", "")
    print S

L = S.count("(")
R = S.count(")")
print L, R

print "("*R+t+")"*L
Problem p03359 (python)

Fixed submission:
t,h=map(int,input().split())
a=t
if t>h:
	a=a-1
print(a)

Buggy submission (verdict: Runtime Error):
t  =int(input())
h =int(input())
a=13-t
if h>t:
	a=a-1
print(a)
Problem p03389 (python)

Fixed submission:
import math

a,b,c=map(int,input().split())
num=[a,b,c]
num.sort()
if (num[1]+num[0])%2==0:
	ans=((num[2]*3)-(num[0]+num[1]+num[2]))/2
else :
	ans=(((num[2]+1)*3)-(num[0]+num[1]+num[2]))/2
ans=math.floor(ans)
print(ans)

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
num=[a,b,c]
num.sort()
ans=((num[2]*3)-(num[0]+num[1]+num[2]))/2
print(ans)
Problem p03407 (python)

Fixed submission:
a,b,c = map(int,input().split())
if a+b>=c:
  print("Yes")
else:
  print("No")

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

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().spilt())
if((a+b)>=c):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().spilt())
if(a+b>=c):
  print("Yes")
else:
  print("No")
Problem p03564 (python)

Fixed submission:
N=int(input())
K=int(input())
ans=1
c=0
while c<N:
	if ans<K:
		ans=ans*2
	else:
		ans=ans+K
	c+=1
print(ans)

Buggy submission (verdict: Runtime Error):
N,K=map(int,raw_input().split())
ans=1
c=0
while c<N:
	if ans<K:
		ans=ans*2
	else:
		ans=ans+K
	c+=1
print(ans)
Problem p03262 (python)

Fixed submission:
import fractions

N, X = map(int, input().split())
x = list(map(int,input().split()))
D = abs(x[0]-X)
for i in x:
    D = fractions.gcd(D,abs(i-X))
print(D)

Buggy submission (verdict: Runtime Error):
import fractions

N, X = map(int, input.split())
x = list(map(int,input.split()))
D = abs(x[0]-X)
for i in x:
    D = fractions.gcd(D,abs(i-X))
print(D)
Problem p03284 (python)

Fixed submission:
N, K = input().split()
N=int(N)
K=int(K)
if K==0:
    print("ZeroDivisionError!!")
elif N % K ==0:
    print(0)
else :
    print(1)

Buggy submission (verdict: Runtime Error):
N, K = input().split()
N=int()
K=int()
if N % K == 0:
    print(0)
else :
    print(1)

Buggy submission (verdict: Runtime Error):
N, K = input().split()
if N%K == 0:
    print(0)
else :
    print(1)

Buggy submission (verdict: Runtime Error):
N=int(input())
K=int(input())
if N%K==0:
    print(0)
else :
    print(1)

Buggy submission (verdict: Runtime Error):
N=int(input())
K=int(input())
if N%K==0:
    print(0)
else :
    print(1)

Buggy submission (verdict: Runtime Error):
N=int(input())
K=int(input())
if N%K==0:
    print(0)
else :
    print(1)

Buggy submission (verdict: Runtime Error):
N=int(input())
K=int(input())
if N/K==0:
    print(0)
else :
    print(1)

Buggy submission (verdict: Runtime Error):
#1<=int(N)
#int(K)<=100
N=int(input())
K=int(input())
if N/K==0:
    print(1)
else :
    print(0)

Buggy submission (verdict: Runtime Error):
#1<=int(N)
#int(K)<=100
N=int(input())
K=int(input())
if N/K==0:
    print(0)
else :
    print(1)
Problem p03285 (python)

Fixed submission:
N=input()
N=int(N)
if N<=3 :
    print('No')
elif N%4 == 0:
    print('Yes')
elif N%7==0 :
    print('Yes')
elif (N-7)%4==0 and N-7>=0:
    print('Yes')
elif (N-14)%4==0 and N-14>=0:
    print('Yes')
elif (N-21)%4==0 and N-21>=0:
    print('Yes')
else :
    print('No')

Buggy submission (verdict: Runtime Error):
N=input()
for i in range(N / 7)
    print(N / 7*i %4==0)