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

Fixed submission:
s = input()
 
if not s.count("a") == 1:
  print("No")
elif not s.count("b") == 1:
  print("No")
elif not s.count("c") == 1:
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
s = input()
if "".join(s.sort()) == "abc":
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
s = input()

if s.count("a"), s.count("b"), s.count("c") == 1,1,1:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
s = input()

if not s.count("a") == 1:
  print("NO")
  break
elif not s.count("b") == 1:
  print("NO")
  break
elif not s.count("c") == 1:
  print("NO")
  break
else:
  print("YES")
Problem p03386 (python)

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

ans = list(range(a, a+k)) + list(range(b-k+1, b+1))
ans.sort()
ans2 = []
for i in ans:
    if a<=i<=b and i not in ans2:
        ans2.append(i)

for j in ans2:
    print(j)

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

ans = list(range(a, a+k)) + list(range(b-k, b))
ans2 = [i for i in ans if a<=i<=b and i not in ans2]

for j in ans2:
    print(j)

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

ans = []
for i in range(k):
    if a+i <= b:
        ans.append(a+i)
for j in range(k):
    if a <= b-k+j and b-k+j not in ans:
        ans.append(b-k+j)

for n in ans.sort():
    print(n)
Problem p03456 (python)

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

print("Yes" if ab**(1/2)%1==0 else "No")

Buggy submission (verdict: Runtime Error):
a, b = input().split()
ab = int(a+b)
print("Yes" if ab**(1/2))%1==0 else "No")

Buggy submission (verdict: Runtime Error):
a,b=input()
ab = int(a+b)
print("Yes" if type(ab**(1/2))==int else "No")
Problem p03471 (python)

Fixed submission:
N, Y = map(int, input().split())

flag = False
for x in range(N+1):
    for y in range(N-x+1):
        z = N - (x + y)
        if Y == 10000 * x + 5000 * y + 1000 * z:
            flag = True
            print(x, y, z)
            break
    if flag:
        break
else:
    print(-1, -1, -1)

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input())

flag = False
for x in range(N+1):
    for y in range(N+1):
        z = N - (x + y)
        if Y == 10000 * x + 5000 * y + 1000 * z:
            flag = True
            print(x, y, z)
            break
    if flag:
        break

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input())

for x in range(N+1):
    for y in range(N+1):
        z = N - (x + y)
        if Y == 10000 * x + 5000 * y + 1000 * z:
            flag = True
            print(x, y, z)
            break
    if flag:
        break
Problem p03473 (python)

Fixed submission:
print(48 - int(input()))

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

if s[a+1] == "-":
    s2 = s[:a+1] + s[a+2:]
    for i in range(a+b):
        if s2[i] not in ["0","1","2","3","4","5","6","7","8","9"]:
            print("No")
            break
    else:
        print("Yes")
else:
    print("No")
Problem p03474 (python)

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

if s[:a].isdecimal() and s[a]=="-" and s[a+1:].isdecimal():
    print("Yes")
else:
    print("No")

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

if s[a] == "-":
    s[a] = ""
    if s.isdigit():
        print("Yes")
    else:
        print("No")
else:
    print("No")

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

if s[a+1] == "-":
    s2 = s[:a+1] + s[a+2:]
    for i in range(a+b+1):
        if s2[i] not in ["0","1","2","3","4","5","6","7","8","9"]:
            print("No")
            break
    else:
        print("Yes")
else:
    print("No")
Problem p03545 (python)

Fixed submission:
S = input()


for i in range(2**3):
    formula = ""

    for j in range(3):
        formula += S[j]
        if (i >> j) & 1:
            formula += "+"
        else:
            formula += "-"
    formula += S[-1]

    if eval(formula) == 7:
        print(formula + "=7")
        break

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


for i in range(2**3):
    formula = ""

    for j in range(4):
        formula += S[j]
        if (i >> j) & 1:
            formula += "+"
        else:
            formula += "-"

    if eval(formula) == 7:
        print(formula + "=7")
        break
Problem p03563 (python)

Fixed submission:
r = int(input())
g = int(input())

print(2*g-r)

Buggy submission (verdict: Runtime Error):
r = int(input())
g = int(input())

print(r+2g)
Problem p03573 (python)

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

Buggy submission (verdict: Runtime Error):
a,b,c = map(int, input())
if a==b:
  print(c)
elif a==c:
  print(b)
elif b==c:
  print(a)
Problem p03598 (python)

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

sum_len = 0
for i in range(len(X)):
    if X[i] < abs(K-X[i]):
        sum_len += X[i] * 2
    else:
        sum_len += abs(K-X[i]) * 2

print(sum_len)

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

sum_len = 0
for i in X:
    if X < abs(K-X[i]):
        sum_len += X * 2
    else:
        sum_len += abs(K-X[i]) * 2

print(sum_len)
Problem p03609 (python)

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

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

L = [0 for _ in range(10 ** 5 + 2)]

for a in A:
    L[a] += 1

ans = 0
for i in range(1,100001):
    ans = max(ans,L[i-1]+L[i]+L[i+1])

print(ans)

Buggy submission (verdict: Runtime Error):
x, t = imap(int, input().split())
print(x-t if x-t>0 else 0)
Problem p03611 (python)

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

L = [0 for _ in range(10 ** 5 + 2)]

for a in A:
    L[a] += 1

ans = 0
for i in range(1,100001):
    ans = max(ans,L[i-1]+L[i]+L[i+1])

print(ans)

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

L = [0 for _ in range(10 ** 5 + 1)]

for a in A:
    L[a] += 1

ans = 0
for i in range(1,100001):
    ans = max(ans,L[i-1]+L[i]+L[i+1])

print(ans)
Problem p03624 (python)

Fixed submission:
s = list(input())
alpha = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
for x in s:
    if x in alpha:
        alpha.remove(x)
print(alpha[0] if len(alpha)>0 else "None")

Buggy submission (verdict: Runtime Error):
s = list(input())
alpha = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
for x in s:
    alpha.remove(x)
print(alpha[0] if len(alpha)>0 else "None")
Problem p03658 (python)

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

L.sort(reverse=True)
print(sum(L[:K]))

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

ans = 0
for i in range(K):
    ans += L.pop(max(L))

print(ans)

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

for i in range(K):
    ans += L.pop(max(L))

print(ans)
Problem p03671 (python)

Fixed submission:
abc = list(map(int, input().split()))
print(sum(abc) - max(abc))

Buggy submission (verdict: Runtime Error):
abc = [map(int, input().split())]
print(sum(abc) - max(abc))

Buggy submission (verdict: Runtime Error):
abc = [int(input().split())]
print(sum(abc) - max(abc))

Buggy submission (verdict: Runtime Error):
abc = [int(input())]
print(sum(abc) - max(abc))
Problem p03680 (python)

Fixed submission:
N = int(input())
a = [int(input()) for _ in range(N)]

button = 1
for i in range(N):
    if button == 2:
        print(i)
        break
    button = a[button-1]
    
else:
    print(-1)

Buggy submission (verdict: Runtime Error):
N = int(input())
a = [int(input()) for _ in range(N)]

button = 0
for i in range(1,N+1):
    button = a[a[button]-1]
    if button == 2:
        print(i)
else:
    print(-1)

Buggy submission (verdict: Runtime Error):
N = int(input())
a = [int(input()) for _ in range(N)]

button = 0
for i in range(1,N+1):
    button = a[a[button]]
    if button == 2:
        print(i)
else:
    print(-1)
Problem p03711 (python)

Fixed submission:
x,y=map(int,input().split())
a = [1,3,5,7,8,10,12]
b = [4,6,9,11]
c = [2]
if x in a and y in a:
  print("Yes")
elif x in b and y in b:
  print("Yes")
elif x in c and y in c:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
x,y=map(int,input().split())
a = [1,3,5,7,8,10,12]
b = [4,6,9,11]
c = [2]
if x,y in a:
  print("Yes")
elif x,y in b:
  print("Yes")
elif x,y in c:
  print("Yes")
else:
  print("No")
Problem p03719 (python)

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

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input())
print("Yes" if a<=c<=b else "No")
Problem p03720 (python)

Fixed submission:
N, M = map(int, input().split())
c = [0] * N

for _ in range(M):
    a, b = map(int, input().split())
    c[a - 1] += 1
    c[b - 1] += 1

print(*c, sep='\n')

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
ab = []
for i in range(N):
    ab.append(map(int, input().split()))

ans = []
for i in range(1,max(ab)+1):
    ans.append(ans.count(i))

for x in ans:
    print(x)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
ab = [map(int, input().split()) for _ in range(N)]

ans = []
for i in range(1,max(ab)+1):
    ans.append(ans.count(i))

for x in ans:
    print(x)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(N)]

ans = [0] * M
for i in range(N):
    ans[ab[i][0]] += 1
    ans[ab[i][1]] += 1

for x in ans:
    print(x)
Problem p03760 (python)

Fixed submission:
O = input()
E = input()

ans = ""
for i in range(len(E)):
    ans += O[i]
    ans += E[i]
if len(O) > len(E):
    ans += O[-1]

print(ans)

Buggy submission (verdict: Runtime Error):
O = input()
E = input()

ans = ""
for i in range(len(O)):
    ans += O[i]
    ans += E[i]
if len(O) > len(E):
    ans += O[-1]

print(ans)
Problem p03826 (python)

Fixed submission:
a,b,c,d = map(int, input().split())
print(a*b if c*d<a*b else c*d)

Buggy submission (verdict: Runtime Error):
a,b,c,d = map(int, input())
print(a*b if c*d<a*b else c*d)
Problem p03845 (python)

Fixed submission:
N = int(input())
T = list(map(int, input().split()))
M = int(input())
PX = [list(map(int, input().split())) for _ in range(M)]

sum_before = sum(T)
for i in range(M):
    sum_after = sum_before - T[PX[i][0]-1] + PX[i][1]
    print(sum_after)

Buggy submission (verdict: Runtime Error):
N = int(input())
T = list(map(int, input().split()))
M = int(input())
PX = [list(map(int, input().split())) for _ in range(M)]

sum_before = sum(T)
for i in range(M):
    sum_after = sum_before - T[PX[i][0]] + PX[i][1]
    print(sum_after)
Problem p03937 (python)

Fixed submission:
H, W = map(int, input().split())
A = [list(input()) for _ in range(H)]

ans = "Impossible"

cnt = 0
for a in A:
    cnt += a.count("#")

if cnt == H + W - 1:
    ans = "Possible"

print(ans)

Buggy submission (verdict: Runtime Error):
H, W = map(int, input().split())
A = [list(input().split()) for _ in range(H)]

ans = "Impossible"
d = [(1, 0), (0, 1)]


def f(y, x):
    if y == H-1 and x == W-1:
        global ans
        ans = "Possible"
        return
    elif not (0 <= y < H and 0 <= x < W):
        return
    elif A[y][x] == ".":
        return
    
    f(y+1, x)
    f(y, x+1)


f(0, 0)
print(ans)
Problem p03962 (python)

Fixed submission:
a = list(map(int, input().split()))
print(len(set(a)))

Buggy submission (verdict: Runtime Error):
print(len(set(map(input().split()))))

Buggy submission (verdict: Runtime Error):
a = list(map(innt, input().split()))
print(len(set(a)))
Problem p03998 (python)

Fixed submission:
A = input()
B = input()
C = input()

next_turn = A[0]
Acnt = 1
Bcnt = 0
Ccnt = 0
while True:
    if next_turn == 'a':
        if Acnt == len(A):
            print('A')
            break
        next_turn = A[Acnt]
        Acnt += 1

    elif next_turn == 'b':
        if Bcnt == len(B):
            print('B')
            break
        next_turn = B[Bcnt]
        Bcnt += 1

    elif next_turn == 'c':
        if Ccnt == len(C):
            print('C')
            break
        next_turn = C[Ccnt]
        Ccnt += 1

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

next_turn = A[0]
Acnt = 1
Bcnt = 0
Ccnt = 0
while True:
    if next_turn == 'a':
        if Acnt == len(A)-1:
            print('A')
            break
        next_turn = A[Acnt]
        Acnt += 1

    elif next_turn == 'b':
        if Bcnt == len(B)-1:
            print('B')
            break
        next_turn = B[Bcnt]
        Bcnt += 1

    elif next_turn == 'c':
        if Ccnt == len(C)-1:
            print('C')
            break
        next_turn = C[Ccnt]
        Ccnt += 1

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

next_turn = A[0]
Acnt = 1
Bcnt = 0
Ccnt = 0
while True:
    if next_turn == 'a':
        next_turn = A[Acnt]
        Acnt += 1
        if Acnt == len(A)-1:
            print('A')
            break
    elif next_turn == 'b':
        next_turn = B[Bcnt]
        Bcnt += 1
        if Bcnt == len(B)-1:
            print('B')
            break
    elif next_turn == 'c':
        next_turn = C[Ccnt]
        Ccnt += 1
        if Ccnt == len(C)-1:
            print('C')
            break

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

next_turn = A[0]
Acnt = 0
Bcnt = 0
Ccnt = 0
while True:
    if next_turn == 'a':
        next_turn = A[Acnt]
        Acnt += 1
        if Acnt == len(A)-1:
            print('A')
            break
    elif next_turn == 'b':
        next_turn = B[Bcnt]
        Bcnt += 1
        if Bcnt == len(B)-1:
            print('B')
            break
    elif next_turn == 'c':
        next_turn = C[Ccnt]
        Ccnt += 1
        if Ccnt == len(C)-1:
            print('C')
            break
Problem p04043 (python)

Fixed submission:
li=list(map(int,input().split()))
print("YES" if sorted(li)==[5,5,7] else "NO")

Buggy submission (verdict: Runtime Error):
li=list(map(int,input().split()))
print("YES" li.sort()==[5,5,7] else "NO")

Buggy submission (verdict: Runtime Error):
li=map(int,input().split())
print("YES" li.sort()==[5,5,7] else "NO")
Problem p02787 (python)

Fixed submission:
import sys
input = sys.stdin.readline
import numpy as np

h, n = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(n)]
ab = np.array(ab)

a = ab[:, 0]
b = ab[:, 1]

dp = np.zeros(100001, dtype=np.int)
for i in range(1, h+1):
    dp[i] = (dp[i-a]+b).min()

print(dp[h])

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
import numpy as np

h, n = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(n)]
ab = np.array(ab)

a = ab[:, 0]
b = ab[:, 1]

dp = np.zeros(h+1, dtype=np.int)
for i in range(1, h+1):
    dp[i] = (dp[i-a]+b).min()

print(dp[h])
Problem p02803 (python)

Fixed submission:
import sys
input = sys.stdin.readline
from collections import deque

H, W = map(int, input().split())
S = [list(input().split()[0]) for _ in range(H)]

def bfs(S, H, W, start):
    INF = -1
    stack=deque([start])
    distance = [[INF]*W for _ in range(H)]
    distance[start[1]][start[0]] = 0
    while stack:
        x, y = stack.popleft()
        for i, j in [(1,0),(0,1),(-1,0),(0,-1)]:
            next_x = x + i
            next_y = y + j
            if not(0 <= next_x < W and 0 <= next_y < H):
                continue
            if S[next_y][next_x] != '#' and distance[next_y][next_x] == -1:
                stack.append([next_x, next_y])
                distance[next_y][next_x] = distance[y][x] + 1
    return max(map(max, distance))

ans = 0
for i in range(H):
    for j in range(W):
        if S[i][j] != "#":
            ans = max(ans, bfs(S, H, W, (j, i)))
print(ans)

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
from collections import deque

H, W = map(int, input().split())
S = [list(input().split()[0]) for _ in range(H)]

def bfs(S, H, W, start):
    INF = -1
    stack=deque([start])
    distance = [[INF]*W for _ in range(H)]
    distance[start[1]][start[0]] = 0
    while stack:
        x, y = stack.popleft()
        for i, j in [(1,0),(0,1),(-1,0),(0,-1)]:
            next_x = x + i
            next_y = y + j
            if not(0 <= next_x < W and 0 <= next_y < H):
                continue
            if S[next_y][next_x] != '#' and distance[next_y][next_x] == -1:
                stack.append([next_x, next_y])
                distance[next_y][next_x] = distance[y][x] + 1
    return max(map(max, s))

ans = 0
for i in range(H):
    for j in range(W):
        if S[i][j] != "#":
            ans = max(ans, bfs(S, H, W, (j, i)))

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
from collections import deque

H, W = map(int, input().split())
S = [list(input().split()[0]) for _ in range(H)]

def bfs(S, H, W, start):
    INF = -1
    stack=deque([start])
    distance = [[INF]*W for _ in range(H)]
    distance[start[1]][start[0]] = 0
    while stack:
        x, y = stack.popleft()
        for i, j in [(1,0),(0,1),(-1,0),(0,-1)]:
            next_x = x + i
            next_y = y + j
            if not(0 <= next_x < W and 0 <= next_y < H):
                continue
            if S[next_y][next_x] != '#' and distance[next_y][next_x] == -1:
                stack.append([next_x, next_y])
                distance[next_y][next_x] = distance[y][x] + 1
    return max(max(distance))

ans = 0
for i in range(H):
    for j in range(W):
        if S[i][j] == "."
            ans = max(ans, bfs(S, H, W, (j, i)))
print(ans)
Problem p02811 (python)

Fixed submission:
import sys
input = sys.stdin.readline

k, x = map(int, input().split())
if 500*k >= x:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
import math

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

a = [ai >> 1 for ai in a]

import fractions
from functools import reduce

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

def f(x):
    cnt = 0
    while x%2 == 0:
        x //= 2
        cnt += 1
    return cnt

cnt = f(a[0])
for i in range(1, len(a)):
    if cnt != f(a[i]):
        print(0)
        break
else:
    lcm = reduce(lambda x, y: getLCM(x, y), a)
    ans = (m-lcm) // (lcm*2) + 1 if m >= lcm else 0
    print(ans)
Problem p02814 (python)

Fixed submission:
import sys
input = sys.stdin.readline

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

a = [ai >> 1 for ai in a]

import fractions
from functools import reduce

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

def f(x):
    cnt = 0
    while x%2 == 0:
        x //= 2
        cnt += 1
    return cnt

cnt = f(a[0])
for i in range(1, len(a)):
    if cnt != f(a[i]):
        print(0)
        break
else:
    lcm = reduce(lambda x, y: getLCM(x, y), a)
    ans = (m-lcm) // (lcm*2) + 1 if m >= lcm else 0
    print(ans)

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
import math
import numpy as np

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

a = np.array(a)
a = a // 2

import fractions
from functools import reduce

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

def f(x):
    cnt = 0
    while x%2 == 0:
        x //= 2
        cnt += 1
    return cnt

cnt = f(a[0])
for i in range(1, len(a)):
    if cnt != f(a[i]):
        print(0)
        break
else:
    lcm = reduce(lambda x, y: getLCM(x, y), a)
    ans = (m-lcm) // (lcm*2) + 1 if m >= lcm else 0
    print(ans)

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

import numpy as np

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

a = np.array(a)
tmp = (a/2).astype(np.int)
lcm = np.lcm.reduce(tmp)

max_a = max(a)
if max_a%lcm == 0:
    lcm = lcm * (max(a)//lcm)
else:
    lcm = lcm * (max(a)//lcm+1)

if m < lcm:
    print(0)
else:
    if m%lcm == 0:
        print(m//lcm)
    else:
        print(m//lcm+1)
Problem p02900 (python)

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

temp = fractions.gcd(a, b)

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

d = make_divisors(temp)
d.sort()

for ele in d:
    if ele==1:
        continue
    d = [e for e in d if e%ele!=0 or ele==e] 

print(len(d))

Buggy submission (verdict: Runtime Error):
import copy
import fractions
a, b = map(int, input().split())

temp = fractions.gcd(a, b)

def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]

d = primes(temp)
ans = 1
for ele in d:
    if a%ele==0 and b%ele==0:
        ans += 1

print(ans)

Buggy submission (verdict: Runtime Error):
import copy
import fractions
a, b = map(int, input().split())

temp = fractions.gcd(a, b)

c = [None]*(temp+1)
for i in range(2, temp+1):
    if a%i==0 and b%i==0:
        c[i] = i

for ele in c:
    if ele!=None:
        c = [e for e in c if e!=None and (e%ele!=0 or e==ele)]
print(len(c)+1)
Problem p02909 (python)

Fixed submission:
s = input()
if s == 'Sunny':
    print('Cloudy')
elif s=='Rainy':
    print('Sunny')
else:
    print('Rainy')

Buggy submission (verdict: Runtime Error):
import bisect
import numpy as np

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

a = sorted(a)
a = np.array(a)

for i in range(m):
    a[n-1] = a[n-1] // 2
    temp = a.pop()
    bisect.insort_left(a, temp)
print(sum(a))
Problem p02918 (python)

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

cnt = 0
for i in range(n-1):
    if s[i] == s[i+1]:
        cnt += 1
ans = min(cnt+2*k, n-1)
print(ans)

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

cnt = 0
for i in range(n-1):
    if s[i] != s[i+1]:
        cnt += 1
ans = min(count+2*k, n-1)
print(ans)

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

cnt = 0
for i in range(n):
    if s[i] != s[i+1]:
        cnt += 1
ans = min(count+2*k, n-1)
print(ans)

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

cnt = 0
for i in range(n):
    if s[i] != s[i+1]:
        cnt += 1
ans = min(count+2*k, n-1)
Problem p03059 (python)

Fixed submission:
a, b, t = map(int, input().split())
cnt = 0
temp = a
while t+0.5 > temp:
    cnt += 1
    temp += a
print(b*cnt)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = map(int, input().split())
*a_abs, = map(abs, a)
if len([i for i in a if i<0])%2 ==0:
    print(sum(a_abs))
else:
    print(sum(a_abs)-2*min(a_abs))