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

Fixed submission:
S = input()
T = input()
ans = "Yes"
start = [-1]*27
goal = [-1]*27
for i in range(len(S)):
    s,t = ord(S[i])-96,ord(T[i])-96
    if start[s]!=-1 or goal[t]!=-1:
        if start[s]!=t or goal[t]!=s:
            ans = "No"
    else:
        start[s] = t
        goal[t] = s
print(ans)

Buggy submission (verdict: Runtime Error):
S = input()
T = input()
ans = "Yes"
start = [-1]*26
goal = [-1]*26
for i in range(len(S)):
    s,t = ord(S[i])-96,ord(T[i])-96
    if start[s]!=-1 or goal[t]!=-1:
        if start[s]!=t or goal[t]!=s:
            ans = "No"
    else:
        start[s] = t
        goal[t] = s
print(ans)
Problem p03631 (python)

Fixed submission:
n = list(input())
if n[0]==n[2]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
n = list(input().split())
if n[0]==n[2]:
    print("Yes")
else:
    print("No")
Problem p02897 (python)

Fixed submission:
a = int(raw_input())

if (a%2 == 0):
    print(0.5)
else:
    odd = (a // 2) + 1
    odd = float(odd)
    print (float(odd/a))

Buggy submission (verdict: Runtime Error):



def is_prime(n):
    if n == 2 or n == 3: return True
    if n < 2 or n%2 == 0: return False
    if n < 9: return True
    if n%3 == 0: return False
    r = int(n**0.5)
    f = 5
    while f <= r:
        print '\t',f
        if n%f == 0: return False
        if n%(f+2) == 0: return False
        f +=6
        return True  

def divisor(a,b):
    tab = [1]
    for i in range (2, min(a,b)):
        if (a%i == 0 and b%i == 0):
            tab.append(i)
    return tab

def separatePrime(tab):
    pr = []
    npr = []
    for i in tab:
        if (is_prime(i) or i == 1):
            pr.append(i)
        else:
            npr.append(i)
    return pr, npr

def finish(pr, npr):
    for i in npr:
        can = True
        j = 1
        while (can and j < len(pr)):
            if (i%pr[j] == 0):
                can = False
            j += 1
        if (can):
            pr.append(i)
    
    return (len(pr))

data = raw_input().split()
a,b = int(data[0]), int(data[1])
tab = divisor(a,b)

pr,npr = separatePrime(tab)

print finish(pr, npr)
Problem p02754 (python)

Fixed submission:
N,A,B=map(int,input().split())
div=N//(A+B)
mod=N%(A+B)
print(div*A+min(mod,A))

Buggy submission (verdict: Runtime Error):
n,a,b = map(int,input()split())
div=n//(a+b)
mod=n%(a+b)
print(div*a+min(mod,a))
Problem p02935 (python)

Fixed submission:
N=int(input())
v=sorted(map(int,input().split()))
value=v[0]
for i in range(1,N):
    value=(value+v[i])/2
print(value)

Buggy submission (verdict: Runtime Error):
N = int(input())
v = sorted(map(int,input().split()))
value=v[0]
for in range(1,N):
  value = (value+ v[i])/2
print(value)
Problem p02847 (python)

Fixed submission:
S=input()
if S=="SUN":
  print(7)
if S=="MON":
  print(6)
if S=="TUE":
  print(5)
if S=="WED":
  print(4)
if S=="THU":
  print(3)
if S=="FRI":
  print(2)
if S=="SAT":
  print(1)

Buggy submission (verdict: Runtime Error):
S=input()
print(7 if S=="SUN" 6 if S=="MON" 5 if S=="TUE" 4 if S=="WED" 3 if S=="THU" 2 if S=="FRI" 1 if S=="SAT"

Buggy submission (verdict: Runtime Error):
S=input()
if S==SUN:
  print(7)
if S==MON:
  print(6)
if S==TUE:
  print(5)
if S==WED:
  print(4)
if S==THU:
  print(3)
if S==FRI:
  print(2)
if S==SAT:
  print(1)

Buggy submission (verdict: Runtime Error):
S=input()
print(7 if S==SUN 6 if S==MON 5 if S==TUE 4 if S==WED 3 if S==THU 2 if S==FRI 1 if S==SAT
Problem p02595 (python)

Fixed submission:
N,D=map(int,input().split())
X=[]
Y=[]
for i in range(N):
    x,y=input().split()
    X.append(int(x))
    Y.append(int(y))

import math
def get_distance(x,y):
    d=math.sqrt(((x)**2+(y)**2))
    return d

a=0
for i in range(N):
    distance=get_distance(x=X[i],y=Y[i])
    if distance<=D:
        a+=1
print(a)

Buggy submission (verdict: Runtime Error):
N,D=map(int,input().split())
X=[]
Y=[]
for i in range(N):
    x,y=input().split()
    X.append(int(x))
    Y.append(int(y))

import math
def get_distance(x,y):
    d=math.sqrt(((x)**2+(y)**2))
    return d

a=0
for i in range(N+1):
    distance=get_distance(x=X[i],y=Y[i])
    if distance<=D:
        a+=1
print(a)

Buggy submission (verdict: Runtime Error):
N,D=map(int,input().split())
X=[]
Y=[]
for i in range(N):
    x,y=input().split()
    X.append(int(x))
    Y.append(int(y))

import math
def get_distance(x,y):
    d=math.sqrt(((x)**2+(y)**2))
    return d

a=0
for i in range(N+1):
    distance=get_distance(x=X[i],y=Y[i])
    if distance<=N:
        a+=1
print(a)
Problem p02578 (python)

Fixed submission:
n=int(input())
l=list(map(int,input().split()))
p=l[0]
x=0
for i in range(1,n):
       if l[i]<p:
       		x+=p-l[i]
       elif l[i]>p:
       		p=l[i]
print(x)

Buggy submission (verdict: Runtime Error):
n=int(input())
l=list(map(int,input().split())
p=l[0]
x=0
for i in range(1,n):
       if l[i]<p:
       		x+=p-l[i]
       elif l[i]>p:
       		p=l[i]
print(x)
Problem p02598 (python)

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

def check(l):
    count = 0
    for L in A:
        count += L // l
        if L % l != 0:
            count += 1
        count -= 1
    return count <= K

bottom, top = 0, max(A)

while top - bottom > 1:
    mid = (top + bottom) // 2
    if check(mid):
        top = mid
    else:
        bottom = mid

print(top)

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

def check(1):
  count = 0
  for L in A:
    count = count + L // 1
    if L % 1 != 0:
      count = count + 1
    count = count - 1
  return count <= K

bottom, top = 0, max(A)

while top - bottom > 1:
  mid = (top + bottom) // 2
  if check(mid):
    top = mid
  else:
    bottom = mid

print(top)
Problem p02577 (python)

Fixed submission:
def digital_root(n):
  return n if n < 10 else digital_root(sum(map(int,str(n))))
 
n = int(input())
if(digital_root(n) % 9 == 0):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
def digital_root(n):
  return n if n < 10 else digital_root(sum(map(int,str(n))))

n = input()
if(digital_root(n) % 9 == 0):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
def digital_root(n):
  return n % 9 or n and 9


if __name__ == "__main__" :
  num = input()
  if(digital_root(num)%9==0):
    print("Yes")
  else:
    print("No")

Buggy submission (verdict: Runtime Error):
def digital_root(n):
  	return n if n < 10 else digital_root(sum(map(int,str(n))))
 
num = input()
if(digital_root(n)%9==0):
  print("Yes")
else:
  print("No")
Problem p02987 (python)

Fixed submission:
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline

def main():
    s = input().strip()
    a = s[0] ; b = None
    c = 1 ; d = 0

    for i in range(1, 4):
        if s[i] == a:
            c += 1

        elif b == None:
            b = s[i]
            d += 1

        elif s[i] == b:
            d += 1

    if c == 2 and d == 2:
        print('Yes')
    else:
        print('No')

main()

Buggy submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline

from operator import mul
from functools import reduce



def main():
    n, k = list(map(int, input().split()))
    modulo = 1000_000_000 + 7

    def cmb(n, r):
        if n < r:
            return 0
        r = min(n - r, r)
        if r == 0:
            return 1
        numer = reduce(mul, range(n, n - r, -1))
        denom = reduce(mul, range(1, r + 1))
        return numer // denom % modulo

    for i in range(1, k+1):
        # i分割する方法
        a = cmb(k-1, i-1)
        # 赤のボールを分割する方法
        b = cmb(n-k+1, i)
        print(a * b % modulo)

main()
Problem p02990 (python)

Fixed submission:
from operator import mul
from functools import reduce


def cmb(n, r):
	if n < r:
		return 0
	r = min(n - r, r)
	if r == 0:
		return 1
	numer = reduce(mul, range(n, n - r, -1))
	denom = reduce(mul, range(1, r + 1))
	return numer // denom % INF


N, K = map(int, input().split())
INF = 10 ** 9 + 7

for i in range(1, K + 1):
	print(cmb(K - 1, i - 1) * cmb(N - K + 1, i) % INF)

Buggy submission (verdict: Runtime Error):
import sys
from math import factorial
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
def main():
    n, k = list(map(int, input().split()))
    modulo = 1000_000_000 + 7

    def combinations_count(n, r):
        return factorial(n) // (factorial(n - r) * factorial(r))

    for i in range(1, k+1):
        if i > n//2 + 1:
            print(0)
            continue
        # i分割する方法
        a = combinations_count(k-1, i-1) % modulo
        # 赤のボールを分割する方法
        b = combinations_count(n-k+1, i) % modulo
        print(a * b % modulo)

main()

Buggy submission (verdict: Runtime Error):
import sys
from math import factorial
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
def main():
    n, k = list(map(int, input().split()))
    modulo = 1000_000_000 + 7

    def combinations_count(n, r):
        return factorial(n) // (factorial(n - r) * factorial(r))

    for i in range(1, k+1):
        if i > n//2 + 1:
            print(0)
            continue
        # i分割する方法
        a = combinations_count(k-1, i-1)
        # 赤のボールを分割する方法
        b = combinations_count(n-k+1, i)
        print(a*b%modulo)

main()
Problem p02577 (python)

Fixed submission:
n=int(input())

a=int(n%9)

if a==0:
   print("Yes")
else:
  print("No")

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

a==int(n%9)

if a==0:
   print("Yes")
else:
  print("No")

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

a==int(n%9)

if a==0:
   print(Yes)
else:
  print(No)
Problem p03775 (python)

Fixed submission:
N=int(input())
n=len(str(N))
m=(n//2)
def wari(x):
    array=[]
    if m==0:
        for j in range(9,0,-1):
            if N%j==0:
                c=max(len(str(N//j)),len(str(j)))
                array.append(c)
                break
        
    for i in range(m+1):
        if i==0:
            for j in range(9,0,-1):
                if N%j==0:
                    c=max(len(str(N//j)),len(str(j)))
                    array.append(c)
                    break
        else:
            for j in range((10**(i+1))-1,(10**i)-1,-1):
                if N%j==0:
                    c=max(len(str(N//j)),len(str(j)))
                    array.append(c)
                    break
    return min(array)
print(wari(N))

Buggy submission (verdict: Runtime Error):
N=int(input())
n=len(str(N))
m=(n//2)
def wari(x):
    array=[]
    for i in range(m):
        if i==0:
            for j in range(9,0,-1):
                if N%j==0:
                    c=max(len(str(N//j)),len(str(j)))
                    array.append(c)
                    break
        else:
            for j in range((10**(m+1))-1,(10**m)-1,-1):
                if N%j==0:
                    c=max(len(str(N//j)),len(str(j)))
                    array.append(c)
                    break
    return min(array)
print(wari(N))
Problem p03804 (python)

Fixed submission:
N,M=map(int,input().split())
A=[input()for i in range(N)]
B=[input()for i in range(M)]
b=''
a='no'
for i in range(M):
    b+=B[i]
for i in range(N-M+1):
    if B[0]in A[i] :
        for j in range(N-M+1):
            a=''
            for k in range(M):
                a+=A[i+k][j:j+M]
            if a==b:
                print("Yes")
                exit()
print("No")

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
A=[input()for i in range(N)]
B=[input()for i in range(M)]
b=''
a='no'
for i in range(M):
    b+=B[i]
for i in range(N-M+1):
    if B[0]in A[i] and B[1] in A[i+1]:
        for j in range(N-M+1):
            a=''
            for k in range(M):
                a+=A[i+k][j:j+M]
            if a==b:
                print("Yes")
                exit()
print("No")

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
A=[input()for i in range(N)]
B=[input()for i in range(M)]
b=''
a='no'
for i in range(M):
    b+=B[i]
print(b)
for i in range(N-M+1):
    if B[0]in A[i] and B[1] in A[i+1]:
        for j in range(N-M+1):
            a=''
            for k in range(M):
                a+=A[i+k][j:j+M]
            if a==b:
                print("Yes")
                exit()
print("No")

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
A=[input()for i in range(N)]
B=[input()for i in range(M)]
b=''
a='no'
for i in range(M):
    b+=B[i]
for i in range(N-M+1):
    if B[0]in A[i] and B[1] in A[i+1]:
        for j in range(N-M+2):
            a=''
            for k in range(M):
                a+=A[i+k][j:j+M]
    if a==b:
        print("Yes")
        exit()
print("No")

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
A=[input()for i in range(N)]
B=[input()for i in range(M)]
b=''
a='no'
for i in range(M):
    b+=B[i]
for i in range(N-M+2):
    if B[0]in A[0] and B[1] in A[1]:
        for j in range(N-M+2):
            a=''
            for k in range(M):
                a+=A[i+k][j:j+M]
    if a==b:
        print("Yes")
        exit()
print("No")

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
A=[input()for i in range(N)]
B=[input()for i in range(M)]
b=''
a='no'
for i in range(M):
    b+=B[i]
for i in range(N-M+1):
    if B[0]in A[0] and B[1] in A[1]:
        for j in range(N-M+1):
            a=''
            for k in range(M):
                a+=A[i+k][j:j+M]
    if a==b:
        print("Yes")
        exit()
print("No")
Problem p03805 (python)

Fixed submission:
N,M=map(int,input().split())
import copy
a=[0]*M
b=[0]*M
for i in range(M):
    a[i],b[i]=map(int,input().split())
D=[[1]]
def route(D):
    E=[]
    D1=copy.deepcopy(D)
    for j in range(len(D)):
        x=D[j][-1]
        for i in range(M):

            if a[i]==x:
                if not b[i] in D1[j]:
                    D[j]=copy.deepcopy(D1[j])
                    D[j].append(b[i])
                    E.append(D[j])
            elif b[i]==x:
                if not a[i] in D1[j]:
                    D[j]=copy.deepcopy(D1[j])
                    D[j].append(a[i])
                    E.append(D[j])
    return E
for i in range(N-1):
    D=copy.deepcopy(route(D))
print(len(D))

Buggy submission (verdict: Runtime Error):
def bit_DP(N.Adj):
    dp=[[0]*N for i in range(1<<N)]
    dp[1][0]=1
    for S in range(1<<N):
        for v in range(N):
            if (S&(1<<v))==0:
                continue
            sub=S^(1<<v)
            
            for u in range(N):
                if (sub&(1<<u)) and (Adj[u][v]):
                    dp[S][v]+=dp[sub][u]
    ans=sum(dp[(1<<N)-1][u] for u in range(1,N))
    return ans
def main():
    N,M=map(int,input().split())
    Adj=[[0]*N for i in range(N)]
    for _ in range(M):
        a,b=map(int,input().split())
        Adj[a-1][b-1]=1
        Adj[b-1][a-1]=1
    ans=bit_dp(N,Adj)
    print(ans)
if __name__=='__main__':
    main()

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
import copy
a=[0]*M
b=[0]*M
for i in range(M):
    a[i],b[i]=map(int,input().split())
D=[[1]]
def route(D):
    E=[]
    D1=copy.deepcopy(D)
    for j in range(len(D)):
        x=D[j][-1]
        for i in range(M):

            if a[i]==x:
                if not b[i] in D1[j]:
                    D=copy.deepcopy(D1)
                    D[j].append(b[i])
                    E.append(D[j])
            elif b[i]==x:
                if not a[i] in D1[j]:
                    D=copy.deepcopy(D1)
                    D[j].append(a[i])
                    E.append(D[j])
    return E
for i in range(N-1):
    D=copy.deepcopy(route(D))

if len(D[0])!=N:
    print(0)
    exit()
print(len(D))
Problem p02682 (python)

Fixed submission:
A, B, C, K = map(int, input().split())
if K < A:
    print(K)
elif K <= A+B:
    print(A)
else:
    print(A + (K-A-B)*-1)

Buggy submission (verdict: Runtime Error):
A, B, C, K = map(int, input().split())
if K < A:
    print(K)
elif K =< A+B:
    print(A)
else:
    print(A + (K-A-B)*-1)

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

cards = [1]*A + [0]*B + [-1]*C
print(sum(cards[:K]))
Problem p02577 (python)

Fixed submission:
N=int(input())
if(N%9==0):
	print('Yes')
else:
	print('No')

Buggy submission (verdict: Runtime Error):
N=int(input())
if(N%9==0):
	print('Yes')
else
	print('No')
Problem p02622 (python)

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

cnt = 0
for i in  range(0,slen):
	if S[i] !=T[i]:
		cnt += 1

print(cnt)

Buggy submission (verdict: Runtime Error):
S = input()
T = input()
cnt = 0
for x,y in  S,T:
	if x!=y:
		cnt += 1

print(cnt)

Buggy submission (verdict: Runtime Error):
S = input()
T = input()
T = map(int,imput().split())
cnt = 0
for x,y in  S,T:
	if x!=y:
		cnt += 1

print(cnt)
Problem p02577 (python)

Fixed submission:
from sys import stdin

num =stdin.read().strip()

lst = [int(n) for n in num]
if sum(lst) % 9 == 0:
  print("Yes")
else:
  print("No")

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

num = str(stdin.read())

total = 0
for n in num:
  total += int(n)
 
if total % 9 == 0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
import sys

data = str(sys.stdin().read())

def multiple_nine():
  total = 0
  for num in data:
    total += int(num)
  if total % 9 == 0:
    return "Yes"
  else:
    return "No"
Problem p02711 (python)

Fixed submission:
n = list(input())
if "7" in n:print('Yes')
else:print('No')

Buggy submission (verdict: Runtime Error):
n = int(input())
if 7 in n:
  print('Yes')
else:print('No')
Problem p02754 (python)

Fixed submission:
N, A, B = map(int, input().split())
ans = N //(A + B)*A
rem = N % (A +B)
ans += min(rem, A)

print(ans)

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

a = int(N - B)

pritn(a)
Problem p02771 (python)

Fixed submission:
A, B, C = map(int, input().split())
if A == B == C:
  print('No')
elif A != B and A != C and B != C:
  print('No')
else:
  print('Yes')

Buggy submission (verdict: Runtime Error):
A, B, C = map(int, input().split())
if A == B == C and A !==B !== C:
  print('No')
else:
  print('Yes')
Problem p02879 (python)

Fixed submission:
a, b = map(int, input().split())
if 1 <= a <=9 and 1 <= b <= 9:print(a*b)
else:print('-1')

Buggy submission (verdict: Runtime Error):
n = int(input())
ans = {i*j for i in range(1,10) for j in range(1,10)}
if n in ans:
  print("Yes")
else:print("No")
Problem p02879 (python)

Fixed submission:
a,b=map(int,input().split())
print(a*b if a<10 and b<10 else -1)

Buggy submission (verdict: Runtime Error):
a,b=input()
print(a*b if a<10 and b<10 else -1)
Problem p02880 (python)

Fixed submission:
a=int(input())
for i in range(9):
 if a%(9-i)==0 and a/(9-i)<10:
  print("Yes")
  break
else:
 print("No")

Buggy submission (verdict: Runtime Error):
a=input()
for i in range(9):
 if a%(9-i)==0 and a/(9-i)<10:
  print("yes")
  break
else:
 print("no")
Problem p02676 (python)

Fixed submission:
k=int(input())
s=input()
l=len(s)
if l<=k:
  print(s)
else:
  p=s[0:k]
  q='...'
  r=p+q
  print(r)

Buggy submission (verdict: Runtime Error):
k=int(input())
s=input()
l=len(s)
if s<=k:
  print(s)
else:
  p=s[1:l]
  q='...'
  r=p+q
  print(r)
Problem p02829 (python)

Fixed submission:
a=int(input())
b=int(input())
if a==1:
  if b==2:
    print(3)
  else:
    print(2)
elif a==2:
  if b==1:
    print(3)
  else:
    print(1)
else:
  if b==1:
    print(2)
  else:
    print(1)

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
if a=1:
  if b=2:
    print(3)
  else:
    print(2)
elif a=2:
  if b=1:
    print(3)
  else:
    print(1)
else:
  if a=1:
    print(2)
  else:
    print(1)
Problem p02897 (python)

Fixed submission:
n=int(input())
if n%2==0:
  a=0.5
else:
  a=((n+1)/2)/n
print(a)

Buggy submission (verdict: Runtime Error):
A,B=input().split()
a=int(A)
b=int(B)
m=1
n=1
while n<=min(a,b):
  if a%n==0:
    if b%n==0:
      m=n
      n=n+1
    else:
      n=n+1
  else:
    n=n+1
if m==1:
  print(1)
elif m==2:
  print(2)
else:
  x=3
  u=0
  v=0
  while x<=m:
    t=2
    while t<=x-1:
      if x%t==0:
        u=u+1
        t=t+1
      else:
        u=u
        t=t+1
    if u==0:
      if m%x==0:
        v=v+1
    u=0
    x=x+1
  print(v+2)

Buggy submission (verdict: Runtime Error):
A,B=input().split()
a=int(A)
b=int(B)
m=1
n=1
while n<=min(a,b):
  if a%n==0:
    if b%n==0:
      m=n
      n=n+1
    else:
      n=n+1
  else:
    n=n+1
if m==1:
  print(1)
elif m==2:
  print(2)
else:
  x=3
  u=0
  v=0
  while x<=m:
    t=2
    while t<=x-1:
      if x%t==0:
        u=u+1
        t=t+1
      else:
        u=u
        t=t+1
    if u==0:
      if m%x==0:
        v=v+1
      else:
        v=v
    else:
      v=v
    u=0
    x=x+2
  print(v+2)

Buggy submission (verdict: Runtime Error):
A,B=input().split()
a=int(A)
b=int(B)
m=1
n=1
while n<=min(a,b):
  if a%n==0:
    if b%n==0:
      m=n
    else:
    n=+1
  else:
    n=+1
if m==1:
  print(1)
elif m==2:
  print(2)
else:
  x=3
  u=0
  v=0
  while x<=m:
    t=2
    while t<=x-1:
      if x%t==0:
        u=+1
        t=t+1
      else:
        t=t+1
    if u==0:
      if m%x==0:
        v=v+1
    u=0
    x=+1
  print(v+2)
Problem p02933 (python)

Fixed submission:
A=input()
s=input()
a=int(A)
if a>=3200:
  print(s)
else:
  print('red')

Buggy submission (verdict: Runtime Error):
n=int(input())
v=input().split()
w=sorted(v)
a=1
x=int(w[0])
while a<=n-1:
  y=int(w[a])
  z=float(x)+float(y)
  x=float(z)/float(2)
  a=a+1
print(x)
Problem p03135 (python)

Fixed submission:
T,X=input().split()

t=int(T)
x=int(X)

print(t/x)

Buggy submission (verdict: Runtime Error):
T,X=int(input().split())

t=int(T)
x=int(X)

print(t/x)
Problem p03250 (python)

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

a=int(A)
b=int(B)
c=int(C)

if a>=b:
  if a>=c:
    x=a
    if b>=c:
      y=b
      z=c
    else:
        y=c
        z=b
  else:
      x=c
      y=a
      z=b
else:
  if b>=c:
    x=b
    if a>=c:
      y=a
      z=c
    else:
        y=c
        z=a
  else:
      x=c
      y=b
      z=a

n=x*10+y+z
print(n)

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

a=int(A)
b=int(B)
c=int(C)

if a>=b:
  if a>=c:
    x=a
    if b>=c:
      y=b
      z=c
      else:
        y=c
        z=b
    else:
      x=c
      y=a
      z=b
else:
  if b>=c:
    x=b
    if a>=c:
      y=a
      z=c
      else:
        y=c
        z=a
    else:
      x=c
      y=b
      z=a

n==x*100+y*10+z
print(n)
Problem p03307 (python)

Fixed submission:
n=int(input())
if n%2==0:
  print(n)
else:
  print(2*n)

Buggy submission (verdict: Runtime Error):
n=int(input())
if n%2==0:
  print(n)
else:
  print(2n)
Problem p03723 (python)

Fixed submission:
a, b, c = map(int, input().split())
if a == b and b == c:
    if a % 2 == 0:
        print(-1)
    else:
        print(0)
else:
    count = 0
    while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
        a, b, c = (b + c) // 2, (c + a) // 2, (a + b) // 2
        count += 1
    print(count)

Buggy submission (verdict: Runtime Error):
import sys
import numpy as np
import numba
from numba import jit
 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

@jit
def main(p):
  count = 0
  if np.any(p%2==1):
    return 0
  if np.unique(p).size == 1:
    return -1
  while True:
    if np.all(p%2 == 0):
      print('hoge')
      p = p/2
      count += 1
      continue
    break
  return count


p = np.array(readline().split(), np.int64)
print(main(p))
Problem p03107 (python)

Fixed submission:
S = list(map(int, input()))
ans = 0
l = len(S)
i = 0
while len(S)-1 > i:
    if S[i] != S[i+1]:
        S.pop(i)
        S.pop(i)
        ans += 2
        if i == 0:
            i -= 1
        else:
            i -= 2
    i += 1


print(ans)

Buggy submission (verdict: Runtime Error):
S = list(map(int, input()))
ans = 0
l = len(S)
i = 0
while len(S)-1 > i:
    if S[i] != S[i+1]:
        S.pop(i)
        S.pop(i)
        ans += 2
        i -= 2
    i += 1


print(ans)
Problem p03250 (python)

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

ans = []

ans.append(10*a+b+c)
ans.append(10*b+c+a)
ans.append(10*c+a+b)

print(max(ans))

Buggy submission (verdict: Runtime Error):
,b,c = map(int, input().split())

ans = []

ans.append(10*a+b+c)
ans.append(10*b+a+c)
ans.append(10*c+b+a)

print(max(ans))