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

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

s_L = list(sorted(s_L,reverse=True))
if s_L[0] < sum(s_L[1:]):
    print("Yes")
else:
    print("No")

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

s_L = list(sorted(s_L,reverse=True))
if s_L[0] < sum(s_L[1:]):
    print("Yes")
else:
    print("No")

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

s_L = sorted(s_L,reverse=True)
if s_L[0] < sum(s_L[1:]):
    print("Yes")
else:
    print("No")
Problem p03145 (python)

Fixed submission:
a,b,c = map(int,input().split())
print(int(a*b/2))

Buggy submission (verdict: Runtime Error):
s = int(input())
 
t = [False] * 1000001
i = 1
while True:
  if t[s] == True:
    break
  t[s] = True
  i += 1
  if s % 2 == 0:
    s = s // 2
  else:
    s = 3 * s + 1
 
print(i)
Problem p03147 (python)

Fixed submission:
import sys
sys.setrecursionlimit(20000)

n = int(input())
h_L = list(map(int,input().split()))

counter = 0


def devzero(l,moji=0):
    return_L,tmp = [],[]
    for val in l:
        if val != moji:
            tmp.append(val)
            #print(tmp)
        elif val == moji:
            return_L.append(tmp)
            tmp = []
    return_L.append(tmp)

    return return_L

def rec(L):
    global counter

    if L == []:
        return
    if 0 not in L:
        L = [i-1 for i in L]
        counter += 1
    L = devzero(L,moji=0)
    for val in L:
        rec(val)

if __name__=="__main__":
    rec(h_L)
    print(counter)

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

counter = 0


while h_L != []:

    for i in range(n):
        if h_L[i] == 0:
            counter += 1
            break
        else:
            h_L[i] -= 1

    if h_L[0] == 0:
        h_L.pop(0)

print(counter-1)
Problem p03160 (python)

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

dp = [10**9] * n
dp[0] = 0
dp[1] = abs(h_L[1] - h_L[0])

for i in range(2,n):
    dp[i] = min(dp[i-1]+abs(h_L[i-1] - h_L[i]),dp[i-2]+abs(h_L[i-2] - h_L[i]))

print(dp[n-1])

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

#dp = [float("inf")] * (10**4 + 1)
dp = [10**8] * 20

dp[0] = 0
dp[1] = abs(h_L[0]-h_L[1])

for i in range(2,n):
    #dp[i]
    # 1
    tmp1 = dp[i-1] + abs(h_L[i-1] - h_L[i])
    dp[i] = min(dp[i],tmp1)
    # 2
    tmp2 = dp[i-2] + abs(h_L[i-2] - h_L[i])
    dp[i] = min(dp[i],tmp2)
#print(dp)
print(dp[len(h_L)-1])

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

#dp = [float("inf")] * (10**4 + 1)
dp = [float("inf")] * 20

dp[0] = 0
dp[1] = abs(h_L[0]-h_L[1])

for i in range(2,n):
    #dp[i]
    # 1
    tmp1 = dp[i-1] + abs(h_L[i-1] - h_L[i])
    dp[i] = min(dp[i],tmp1)
    # 2
    tmp2 = dp[i-2] + abs(h_L[i-2] - h_L[i])
    dp[i] = min(dp[i],tmp2)
#print(dp)
print(dp[len(h_L)-1])

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

#dp = [float("inf")] * (10**4 + 1)
dp = [float("inf")] * 20

dp[0] = 0
dp[1] = abs(h_L[0]-h_L[1])

for i in range(1,len(h_L)):
    #dp[i]
    # 1
    tmp1 = dp[i-1] + abs(h_L[i-1] - h_L[i])
    dp[i] = min(dp[i],tmp1)
    # 2
    tmp2 = dp[i-2] + abs(h_L[i-2] - h_L[i])
    dp[i] = min(dp[i],tmp2)
#print(dp)
print(dp[len(h_L)-1])
Problem p03161 (python)

Fixed submission:
n,k = map(int,input().split())
h_L = list(map(int,input().split()))


#dp = [float("inf")] * (20)
dp = [float("inf")] * (10**5 + 1)
dp[0] = 0

for i in range(n):
    for j in range(1,k+1):
        #print(j,i+j)
        # i=1,j=1
        if i - j < 0:
            continue
        dp[i] = min(dp[i],dp[i-j]+abs(h_L[i] - h_L[i-j]))
        #print(i,j)
        #print(dp)

print(dp[n-1])

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
h_L = list(map(int,input().split()))


dp = [float("inf")] * (20)
#dp = [float("inf")] * (10**5 + 1)
dp[0] = 0

for i in range(n):
    for j in range(1,k+1):
        #print(j,i+j)
        # i=1,j=1
        if i - j < 0:
            continue
        dp[i] = min(dp[i],dp[i-j]+abs(h_L[i] - h_L[i-j]))
        #print(i,j)
        #print(dp)

print(dp[n-1])
Problem p03219 (python)

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

Buggy submission (verdict: Runtime Error):
x,y = map(int,input())
print(int(x+y/2))
Problem p03260 (python)

Fixed submission:
a,b = map(int,input().split())
if a*b%2==0:
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
a,b = int(input())
if a*b%2==0:
  print("No")
else:
  print("Yes")
Problem p03264 (python)

Fixed submission:
n = int(input())
if n%2==0:
  k,g = n/2,n/2
else:
  k,g = n//2,n//2+1
print(int(k*g))

Buggy submission (verdict: Runtime Error):
n = input()
if n%2==0:
  k,g = n/2,n//2 + 1
else:
  k,g = n//2,n/2 +1
print(k*g)
Problem p03281 (python)

Fixed submission:
n = int(input()) + 1
ans = 0


def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors

for val in range(n):
    if len(make_divisors(val)) == 8 and val%2 != 0:
        ans += 1
print(ans)

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

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr
ans = 0
for val in range(n):
	if len(factorization(val)) == 8:
      ans +=1
print(ans)
Problem p03285 (python)

Fixed submission:
n = int(input())
for f in range(100//4+1):
	for s in range(100//7+1):
		ans = f*4 + s*7
		if ans == n:
			print("Yes")
			exit()
print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
for f in range(100//4+1):
	for s in range(100//7+1):
    	ans = f*4 + s*7
        if ans == n:
        	print("Yes")
			exit()
print("No")
Problem p03294 (python)

Fixed submission:

import fractions

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

ans = a[0]
for i in range(1, n):
    ans = ans * a[i] // fractions.gcd(ans, a[i])

c = ans -1

#print(c)
ans = 0
for val in a:
    ans += c%val
print(ans)

Buggy submission (verdict: Runtime Error):
import math
from functools import reduce

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

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

n = int(input())
a_L = list(map(int,input().split()))
c = lcm(*a_L) -1

#print(c)
ans = 0
for val in a_L:
    ans += c%val
print(ans)
Problem p03316 (python)

Fixed submission:
n=int(input())
n_=[int(i) for i in str(n)]
s=sum(n_)
if n%s==0:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n1 = input()
n = list(n1)
ans = 0
for i in n1:
  ans += 1
if n%ans ==0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n1 = input()
n = list(n1)
ans = 0
for i in n:
  ans += 1
if n1%ans ==0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n1 = input()
n = list(n1)
ans = 0
for i in n:
  ans += 1
if n%ans ==0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n = list(input())
ans = 0
for i in n:
  ans += 1
if ans%n ==0:
  print("Yes")
else:
  print("No")
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,input().split())
print(max(a+b,a-b,a*b)
Problem p03351 (python)

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

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

Buggy submission (verdict: Runtime Error):
x = int(input())
ans = 0
for a in range(2,x):
  for b in range(2,x):
    if a**b <= x:
        ans = max(ans,a**b)
        #print(a,b)
print(ans)

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

if abs(a-c) =< d:
  print("Yes")
elif abs(a-b) =< d and abs(c-b) =< d:
  print("Yes")
else:
  print("No")
Problem p03369 (python)

Fixed submission:
x = list(input())
print(700+x.count("o")*100)

Buggy submission (verdict: Runtime Error):
x = list(input())
print(700+x.count(o)*100)
Problem p03399 (python)

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
print(min(a,b)+min(c,d))

Buggy submission (verdict: Runtime Error):
#n = int(input())
#a,b = map(int,input().split())
#a_L = list(map(int,input().split()))
a_L = []
for _ in range(4):
    a_L.append(int(input()))
print(min(a_L[0]+a_L[1])+min(a_L[2]+a_L[3]))
Problem p03423 (python)

Fixed submission:
n = int(input())
print(n // 3)

Buggy submission (verdict: Runtime Error):
 int(input())
print(n // 3)
Problem p03424 (python)

Fixed submission:
_ = input()
a_L = list(map(str,input().split()))

if len(set(a_L)) == 3:
    print("Three")
else:
    print("Four")

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

if len(set(a_L)) == 3:
    print("Three")
else:
    print("Four")
Problem p03434 (python)

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

c_L.sort(reverse=True)

alice,bob = 0,0

for val in range(len(c_L)):
    if val %2==0:
        alice += c_L[val]
    else:
        bob += c_L[val]
print(alice-bob)

Buggy submission (verdict: Runtime Error):
n = int(input())
L = list(map(int,input().split()))
L = soterd(L,reverse=True)
a,b = 0,0
for i in range(len(L)):
  if i%2 == 0:
    a += L[i]
  else:
    b += L[i]
print(a-b)
Problem p03455 (python)

Fixed submission:
a,b=map(int,input().split())
print("Even" if a*b%2==0 else "Odd")

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
if a*b % == 0:
  print("Even")
else:
  print("Odd")
Problem p03469 (python)

Fixed submission:
s = [val for val in input()]
s[3] = "8"
print("".join(s))

Buggy submission (verdict: Runtime Error):
n,y=map(int,input().split())
for i in range(n+1):
  for j in range(n-i+1):
    if 10000*i+5000*j+1000*(n-i-j)==y:
        print(i,j,n-i-j);exit()
print(-1,-1,-1)
Problem p03471 (python)

Fixed submission:
n,y=map(int,input().split())
for i in range(n+1):
  for j in range(n-i+1):
    if 10000*i+5000*j+1000*(n-i-j)==y:
        print(i,j,n-i-j)
        exit()
print(-1,-1,-1)

Buggy submission (verdict: Runtime Error):
for i in range(n+1):
  for j in range(n-i+1):
    if 10000*i+5000*j+1000*(n-i-j)==y:
        print(i,j,n-i-j);exit()
print(-1,-1,-1)

Buggy submission (verdict: Runtime Error):
n,y = map(int,input().split())

for m in range(0,n):
    for g in range(0,n):
            s = n-m-g
            if s < 0:
                s = 0
            yen = 10000*m + 5000*g + s*1000
            if int(yen) == int(y):
                print("{0} {1} {2}".format(m,g,s))
                sys.exit()

print("-1 -1 -1")
Problem p03477 (python)

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

if a+b > c+d:
    print("Left")
elif a+b == c+d:
    print("Balanced")
else:
    print("Right")

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

 if a+b > c+d:
   print("Left")
 elif a+b == c+d:
   print("Balanced")
 else:
   print("Right")
Problem p03493 (python)

Fixed submission:
s = input()
counter = 0
for val in s:
    if val=='1':
        counter +=1
print(counter)

Buggy submission (verdict: Runtime Error):
s = list(input())
print(s.count("1")
Problem p03494 (python)

Fixed submission:
import sys

n = int(input())
a_L = list(map(int,input().split()))
counter = 0


while True:
    for val in a_L:
        if val % 2 != 0:
            print(counter)
            sys.exit(0)
    counter +=1
    a_L = [i/2 for i in a_L]

Buggy submission (verdict: Runtime Error):
n = int(input())
a_L = list(map(int,input().split()))
 
ans = 0
while True:
  for i in range(a_L):
    if a_L[i]%2 != 0:
      print(ans)
      exit()
    a_L[i] = a_L[i]%2
  ans += 1
Problem p03502 (python)

Fixed submission:

n= input()
x = map(int,list(n))
#a,b = map(int,input().split())
#a_L = list(map(int,input().split()))
#print(n)
fx = sum(x)

if int(n)%fx == 0:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
n = list(input())
#a,b = map(int,input().split())
#a_L = list(map(int,input().split()))

fx = sum(n)

if int(n)%fx == 0:
    print("Yes")
else:
    print("No")
Problem p03543 (python)

Fixed submission:
n = list(input())

a = list(set(n))

if len(a) > 2:
    print("No")
    exit()

if len(set(n[1:])) == 1 or len(set(n[:3])) == 1 or len(a) == 1:
    print("Yes")
    exit()

print("No")

Buggy submission (verdict: Runtime Error):
n = list(input())
for i in list(set(n)):
	c = n.count(i)
    if c>=3:
      print("Yes")
      exit()
print("No")
Problem p03609 (python)

Fixed submission:
x,t = map(int,input().split())
print(max(0,x-t))

Buggy submission (verdict: Runtime Error):
x,t = map(int,input().splist())
print(max(0,x-t))

Buggy submission (verdict: Runtime Error):
x,t = map(int,input().splist())
print(max(0,x-t)
Problem p03635 (python)

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

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

print((a-1)*(b-1))
Problem p03636 (python)

Fixed submission:
s = list(input())
ans = s[0] + str(len(s)-2) + s[-1]
print(ans)

Buggy submission (verdict: Runtime Error):
s = list(input())
ans = s[0] + len(s)-2 + s[-1]
print(ans)
Problem p03645 (python)

Fixed submission:

n,m = map(int,input().split())

s_L = []

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

    if a == 1:
        s_L.append(b)
    elif b == n:
        s_L.append(a)

#print(s_L)
if len(set(s_L)) == len(s_L):
    print("IMPOSSIBLE")
else:
    print("POSSIBLE")

Buggy submission (verdict: Runtime Error):
import numpy as np
from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson
from scipy.sparse import csr_matrix


n,m = map(int,input().split())

a_L,b_L = [],[]

for i in range(n):
    a,b = map(int,input().split())
    a_L.append(a)
    b_L.append(b)
Problem p03681 (python)

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

if abs(m-n) == 1:
    ans = math.factorial(n) * math.factorial(m)
elif n == m:
    ans = 2*math.factorial(n) * math.factorial(m)
else:
    ans = 0

mod = 10**9+7
print(ans%mod)

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

MOD = 10**9+7
def kaijo(i):
    ans = 1
    for i in range(1,i+1):
        ans *= i%MOD
    return ans

if abs(m-n) == 1:
    ans = kaijo(n) * kaijo(m)
elif n == m:
    ans = 2*kaijo(n) * kaijo(m)


print(ans)

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


def kaijo(i):
    ans = 1
    for i in range(1,i+1):
        ans *= i
    return ans

if abs(m-n) == 1:
    ans = kaijo(n) * kaijo(m)
elif n == m:
    ans = 2*kaijo(n) * kaijo(m)

mod = 10**9+7
print(ans%mod)
Problem p03759 (python)

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

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,input().split())
if 2*b = a+c:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
import string

n = int(input())
s = []
for _ in range(n):
    s.append(input())

az = string.ascii_lowercase
counts = {}
 
for v in az:

    counts[v] = float("inf")
    for i in range(n):
        counts[v] = min(counts[v], s[i].count(v))
 

ans = ""
for k, v in sorted(counts.items()):
    ans += k*v
print(ans)
Problem p03760 (python)

Fixed submission:
s1 = list(input())
s2 = list(input())
n = len(s1)
ans = ""
for i in range(n):
  try:
  	ans += s1[i]+s2[i]
  except:
    ans += s1[i]
print(ans)

Buggy submission (verdict: Runtime Error):
s1 = list(input())
s2 = list(input())

ans = ""
for i,j in s1,s2:
  ans += i+j
print(ans)
Problem p02582 (python)

Fixed submission:
S=input()
ans=0
c=0
for i in range(3):
  if S[i]=="R":
    ans+=1
  else:
    c=max(ans,c)
    ans=0
print(max(c,ans))

Buggy submission (verdict: Runtime Error):
s＝input（）
ans＝0
c＝0
for i in range（3）:
  if s[i]＝＝'R':
    ans+＝1
  else:
    c＝max（ans,c）
    ans＝0
print（c）
Problem p02614 (python)

Fixed submission:
import itertools as it
H,W,N=map(int,input().split())
c=[list(input()) for t in range(H)]
ans=0
for con in it.product(range(2),repeat=H):
  for row in it.product(range(2),repeat=W):
    count=0
    for h in range(H):
      for w in range(W):
        if c[h][w]=='#' and con[h]==1 and row[w]==1 :
          count+=1
    if count==N:
      ans+=1
print(ans)

Buggy submission (verdict: Runtime Error):
import itertools as it
n,m,k=list(map(int,input().split()))
S=[list(str(input())) for h in range(m)]
ans=0
for i in it.product([0,1],repeat=n):
  for j in it.product(range(2),repeat=m):
    count=0
    for h in range(n):
      for c in range(m):
        if S[h][c]=="#" and i[h]+j[c]==0:
          count+=1
    if count==k:
      ans+=1
print(ans)
Problem p02621 (python)

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

Buggy submission (verdict: Runtime Error):
N = int(input())
print(N+N**2+N***3)
Problem p02687 (python)

Fixed submission:
S=input()
if S=="ABC":
  print("ARC")
else:
  print("ABC")

Buggy submission (verdict: Runtime Error):
S=input()
if S=="ABC":
  print("ARC")
else:
  print("ABC)
Problem p02767 (python)

Fixed submission:
N = int(input())
men=list(map(int,input().split()))
for i in range(1,101):
  suu=0
  if i==1:
    for n in range(N):
      suu+=(1-men[n])**2
      ans=suu
  else:
    for h in range(N): 
      suu+=(i-men[h])**2
  if suu<ans:
      ans=suu
print(ans)

Buggy submission (verdict: Runtime Error):
N=input()
list=map(int,input().split())
sum+=0
for i in range(1,N+1)
sum+=abs(i-list)
print(min(sum**2))

Buggy submission (verdict: Runtime Error):
N=input()
list=map(int,input().split())
sum+=0
for i in range(1,N+1)
sum=abs(i-list)
print(min(sum**2))
Problem p02772 (python)

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
for i in range(N):
  if A[i]%2==0:
    if A[i]%3!=0 and A[i]%5!=0:
      print('DENIED')
      exit()
print('APPROVED')

Buggy submission (verdict: Runtime Error):
N=input()
A=list(map(int,input().split()))
for i in range(N):
  if A[i]%2==0:
    if A[i]%3!=0 and A[i]%5!=0:
      print('DENIED')
      exit()
print('APPROVED')
Problem p02818 (python)

Fixed submission:
a,b,c=map(int,input().split())
print(a-c,b) if a>=c else print(0,b-(c-a)) if b>=c-a else print(0,0)

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
print(a-c,b) if a>=c else print(0,b-(k-a)) if b>=k-a else print(0,0)

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
print(a-c,b if a>c else 0,b-(k-a) elif b>k-a else 0,0)
Problem p02842 (python)

Fixed submission:
N=int(input())
for i in range(1,50001):
  if int(i*1.08)==N:
    print(int(i))
    exit()
print(":(")

Buggy submission (verdict: Runtime Error):
N=input()
S=float(N/1.08)
G=int(S*1.08)
if N==G:
  print(int(S))
else:
  print(":(")
Problem p02993 (python)

Fixed submission:
S = input()

if S[0]==S[1] or S[1]==S[2] or S[2]==S[3]:
   print("Bad")
else:
    print("Good")

Buggy submission (verdict: Runtime Error):
S = input()
if S[0]==S[1] or S[1]==S[2] or S[2]==S[3]:
  print("Bad")
  else:
    print("Good")

Buggy submission (verdict: Runtime Error):
S=input()
if S[0]==S[1] or S[1]==S[2] or S[2]==S[3]:
  print("Bad")
  else: print("Good")

Buggy submission (verdict: Runtime Error):
S=input()
if S[3]=S[4] or S[1]=S[2] or S[2]=S[3]:
  print("Bad")
  else: print("Good")

Buggy submission (verdict: Runtime Error):
S=input()
if S[3]=S[4] or S[1]=S[2] or S[2]=S[3]:
  print("Bad")
  else print("Good")

Buggy submission (verdict: Runtime Error):
S=input()
if S[0]=S[1] or S[1]=S[2] or S[2]=S[3]:
  print("Bad")
  else print("Good")

Buggy submission (verdict: Runtime Error):
S=[str(x) for x in input()]
ans=0
for i in range(4):
  if S[i]==S[i+1]:
  	ans+=1
    
    if ans >= 1 :
      print('Bad')
      else print('Good')

Buggy submission (verdict: Runtime Error):
S=[str(x) for in input()]
ans=0
for i in range(4):
  if S[i]==S[i+1]:
  	ans+=1
    
    if ans>=1:
      print('Bad')
      else print('Good')
Problem p03102 (python)

Fixed submission:
N,M,H=list(map(int,input().split()))
B=list(map(int,input().split()))
count=0
for i in range(N):
  A=list(map(int,input().split()))
  ans=0
  for k in range(M):
    ans+=A[k]*B[k]
  if ans+H>0:
    count+=1
print(count)

Buggy submission (verdict: Runtime Error):
N,M,H=list(map(int().input(),split()))
B=list(map(int,input().split()))
count=0
for i in range(N):
  A=list(map(int,input().split()))
  ans=0
  for k in range(M):
    ans+=A[k]*B[k]
  if ans+H>:
    count+=1
print(count)
Problem p03126 (python)

Fixed submission:
N,M = map(int,input().split())
K = []
sum = 0
if N==1:
  W=list(map(int,input().split()))
  W.pop(0)
  K+=W
  print(len(K))
  exit()
for i in range(N):
  W=list(map(int,input().split()))
  W.pop(0)
  K+=W
for T in range(1,len(K)+1):
  B=K.count(T)
  if B == N:
    sum+=1
print(sum)

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
K = []
sum = 0
if N==1:
  W=list(map(int,input().split()))
  W.pop(0)
  K+=W
  print(len(K))
for i in range(N):
  W=list(map(int,input().split()))
  W.pop(0)
  K+=W
for T in range(1,len(K)+1):
  B=K.count(T)
  if B == N:
    sum+=1
print(sum)
Problem p03206 (python)

Fixed submission:
a=int(input())
print("Christmas"+" Eve"*(25-a))

Buggy submission (verdict: Runtime Error):
a=int(input())
print(Christmas+" Eve"*(25-a))

Buggy submission (verdict: Runtime Error):
a=int(input())
print(Christmas+"Eve"*(25-a))

Buggy submission (verdict: Runtime Error):
a=int(input())
print(christmas+"Eve"*(25-a))
Problem p03254 (python)

Fixed submission:
a,b=map(int,input().split())
L=list(map(int,input().split()))
L=sorted(L)
ans=0
if sum(L)<b:
  print(a-1)
elif sum(L)==b:
  print(a)
else:
  for i in range(a):
    ans+=L[i]
    if ans>b:
      print(i)
      exit()

Buggy submission (verdict: Runtime Error):
N,x = map(int,input().split())
hito = input()
poo = [hito]
zyun = sorted(hito)
ok = 0
for i in range(len(poo)):
	if x-zyun[i]>=0:
      ok+=1
    else:
      print(ok)
Problem p03386 (python)

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

 
 
ans = []
for x in range(A, min(A+K,B+1)):
    ans.append(x)
for x in range(max(A,B-K+1), B+1):
    ans.append(x)
for x in sorted(list(set(ans))):
    print(x)

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
L=[]
for i in range(c):
  L.append(a+i)
  for j in range(c):
    L.append(b-j)
  
   print(list(set(L)))
Problem p03455 (python)

Fixed submission:
A,B=map(int,input().split())
print("Even" if A*B%2==0 else "Odd")

Buggy submission (verdict: Runtime Error):
A,B=int(input().split())
print("Even" if A*B//2==0 else "Odd")
Problem p03456 (python)

Fixed submission:

import math

a,b = input().split()
d = int(a + b)
if int(math.sqrt(d)) * int(math.sqrt(d)) == d :
	print('Yes')
else :
	print('No')

Buggy submission (verdict: Runtime Error):
A,B=map(input().split())
S=A+B
S**0.5=K
if K%1==0:
  print("Yes") 
else ("No")
Problem p03493 (python)

Fixed submission:
s=input()
print(s.count("1"))

Buggy submission (verdict: Runtime Error):
S=list(map(input().split()))
print(S.count("1"))