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

Fixed submission:
a=int(input())
s=list(map(int,input().split()))
count=0
good=0
for i in s:
    if i%2==0:
        count+=1
        if i%3==0 or i%5==0:
            good+=1
if good==count:
    print('APPROVED')
else:
    print('DENIED')

Buggy submission (verdict: Runtime Error):
a=input()
s=list(map(int, input().split()))
bad=0
for i in s:
    if s%2==0:
        if s%3!=0 or s%5!=0:
            bad+=1
if bad>0:
    print('DENIED') 
else:
    print('APPROVED')

Buggy submission (verdict: Runtime Error):
a=input()
s=list(map(int, input().split()))
bad=0
for i in s:
    if s%2==0:
        if s%3!=0 or s%5!=0:
            bad+=1
if bad>0:
    print('DENIED') 
    else:
        print('APPROVED')
Problem p02783 (python)

Fixed submission:
a,b=map(int,input().split())
count=0
while a>0:
    count+=1
    a-=b
print(count)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
s=list(map(int,input().split()))
if a<=sum(s):
    print ("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
s=list(map(int,input().split()))
count=0
for i in range(b):
        for j in range(i,b):
            if a<s[i]+s[j] and count==0:
                print("yes")
                count+=1
if count==0:
    print("no")

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
s=list(map(int,input().split()))
count=0
for i in range(b):
        for j in range(i,b):
            if a<s[i]+s[j] and count==0:
                print("yes")
                count+=1
if count==0:
    print("no")
Problem p02791 (python)

Fixed submission:
a=int(input())
s=list(map(int,input().split()))
count=0
min=s[0]
for i in range(0,a):
    if min>=s[i]:
        count+=1
        min=s[i]
print(count)

Buggy submission (verdict: Runtime Error):
a=input(int)
s=list(map(int,input().split()))
count=0
min=s[0]
for i in range(0,a):
    if min>=s[i]:
        count+=1
        min=s[i]
print(count)

Buggy submission (verdict: Runtime Error):
a=input()
s=list(map(int,input().split()))
count=0
min=s[0]
for i in range(1,a):
    if min>s[i] :
        count+=1
        min=s[j]
print(count)

Buggy submission (verdict: Runtime Error):
a=input()
s=list(map(int,input().split()))
count=0
min=s[0]
for i in range(1,a):
    if min>s[i] :
        count+=1
        min=s[j]
print(count)

Buggy submission (verdict: Runtime Error):
a=input()
s=list(map(int,input().split()))
count=0
counter=0
for i in a:
    counter=0
    for j in range(0,i):
      if counrer==1:
        break
        if s[i]>s[j] :
            count+=1
            counter+=1
print(count)

Buggy submission (verdict: Runtime Error):
a=input()
s=list(map(int,input().split()))
count=0
counter=0
for i in a:
    counter=0
    for j in range(0,i):
        if s[i]>s[j] and counter==0:
            count+=1
            counter+=1
print(count)
Problem p02801 (python)

Fixed submission:
alp=input()
ask=ord(alp)
print(chr(ask+1))

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

s+=1
print(s)

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

s+=1
print(s)
Problem p02861 (python)

Fixed submission:
import math
N=int(input())
x=[0]*N
y=[0]*N
for i in range(N):
    x[i],y[i]=map(int,input().split())
ans_sum=0
for i in range(N):
    for j in range(N):
            ans_sum+=math.sqrt((x[j]-x[i])**2+(y[j]-y[i])**2)
print(ans_sum/N)

Buggy submission (verdict: Runtime Error):
import math
N=int(input())
x=[0]*N
y=[0]*N
for i in range(N):
    x[i],y[i]=map(int,input().split())
ans_sum=0
for i in range(N):
    for j in range(N):
        if i!=j:
            ans_sum+=math.sqrt((x[i]-x[j])**2+(y[i]-y[j])**2)
print(ans_sum*(n-1)/math.factorial(N))
Problem p02718 (python)

Fixed submission:
n, m = [int(x) for x in input().split()]
l = [int(x) for x in input().split()]
k = []
for i in l:
  if(i >= sum(l)/(4*m)):
    k.append(i)
if(len(k) < m):
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
n, m = [int(x) for x in input().split()]
l = [int(x) for x in input().split()]
k = []
for i in l:
  if(i > sum(l)/(4*m))
  	k.append(i)
if(len(k) < m):
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
n, m = [int(x) for x in input().split()]
l = [int(x) for x in input().split()]
k = []
for i in l:
  if(i >= sum(l)/(4*m)):
    k.append(i)
if(len(k) < m):
  print("No")
else:
print("Yes")
Problem p02719 (python)

Fixed submission:
a,b=map(int, input().split())
a=a%b
if a==0:
    print(0)
else:
    arr=[]
    arr.append(a)
    while True:
        a=abs(a-b)
        if sum(x == a for x in arr)==1:
            break
        else:
            arr.append(a)

    print(min(arr))

Buggy submission (verdict: Runtime Error):
import math
a,b=map(int, input().split())
print(math.gcd(a,b))

Buggy submission (verdict: Runtime Error):
import math
a,b=map(int, input().split())
print(math.gcd(a,b))
Problem p02718 (python)

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

vote = []
all = 0

for j in range(N):
    all += A[j]

for i in range(N):
    if A[i] >= all / (4 * M):
        vote.append(A[i])

if len(vote) >= M:
    print("Yes")

else:
    print("No")

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

vote = []

for j in range(N):
    all += A[j]

for i in range(N):
    if A[i] >= all // (4 * M):
        vote.append(A[i])

if len(vote) >= M:
    print("Yes")

else:
    print("No")
Problem p02917 (python)

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

answer = B[0] + B[N-2]

for i in range(N-2):
    answer += min(B[i],B[i+1])

print(answer)

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

answer = B[0] + B[N-2]

for i in range(N-2):
    answer += min(B[i],B[i+1])

print(answer)
Problem p02957 (python)

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

if (a + b) % 2 == 0:
    print((a+b)//2)
else:
    print('IMPOSSIBLE')

Buggy submission (verdict: Runtime Error):
s = [int(x) if x!='?' else -1 for x in input()]

mod = 1000000007
length = len(s)
ans = list([0]*13 for i in range(length+1))
ans[0][0] = 1

mod_x10 = [0]*13
for i in range(13):
    mod_x10[i] = i * 10 % 13 - 1

for i in range(length):
    for j in range(13):
        x = mod_x10[j]
        if s[i] == -1:
            for k in range(10):
                x = (x + 1) % 13
                ans[i+1][x] += ans[i][j] % mod
        else:
            x = (x + int(s[i]) + 1) % 13
            ans[i+1][x] += ans[i][j] % mod

print('a')
print(ans[length][5] % mod)

Buggy submission (verdict: Runtime Error):
s = [int(x) if x!='?' else -1 for x in input()]

mod = 1000000007
length = len(s)
ans = list([0]*13 for i in range(length+1))
ans[0][0] = 1

mod_x10 = [0]*13
for i in range(13):
    mod_x10[i] = i * 10 % 13 - 1

for i in range(length):
    for j in range(13):
        x = mod_x10[j]
        if s[i] == -1:
            for k in range(10):
                x = (x + 1) % 13
                ans[i+1][x] += ans[i][j] % mod
        else:
            x = (x + int(s[i]) + 1) % 13
            ans[i+1][x] += ans[i][j] % mod

print(ans[length][5] % mod)
print('a')

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

mod = 1000000007
length = len(s)
ans = list([0]*13 for i in range(length+1))
ans[0][0] = 1

for i in range(length):
    for j in range(13):
        x = j*10 % 13 - 1
        if s[i] == '?':
            for k in range(10):
                x = (x + 1) % 13
                ans[i+1][x] += ans[i][j]
        else:
            x = (x + int(s[i]) + 1) % 13
            ans[i+1][x] += ans[i][j]

print(ans[length][5] % mod)

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

if (a + b) % 2 == 0:
    print((a+b)/2)
else:
    print(IMPOSSIBLE)
Problem p02960 (python)

Fixed submission:
MOD = 1000000007;

s = [int(x) if x!="?" else -1 for x in input()]

n=len(s)

r=[0]*13

c=s[0]
if (c!=-1):
	r[c]=1
else:
	for i in range(10):r[i]=1

for i in range(1,n):
	dp=[0]*26
	for j in range(13):dp[j*10%13]+=(r[j]%MOD)
	dp[13:26]=dp[0:13]
	c=s[i]
	r=[0]*13
	if (c==-1):
		w=sum(dp[4:14])
		for j in range(13):
				r[j]+=w
				w=w+dp[j+1]-dp[4+j]
	else:
		for j in range(13):
			r[j]+=dp[13-c+j]
print (r[5]%MOD)

Buggy submission (verdict: Runtime Error):
s = [int(x) if x!='?' else -1 for x in input()]
??2??5

mod = 1000000007
length = len(s)
ans = list([0]*13 for i in range(length+1))
ans[0][0] = 1

mod_x10 = [0]*13
for i in range(13):
    mod_x10[i] = i * 10 % 13 - 14

for i in range(length):
    if s[i] == -1:
        for j in range(13):
            x = mod_x10[j]
            for k in range(10):
                x = x + 1
                ans[i+1][x] += ans[i][j] % mod
    else:
        for j in range(13):
            ans[i+1][(mod_x10[j] + s[i] + 1) % 13] += ans[i][j] % mod

print('a')
print(ans[length][5] % mod)
Problem p02969 (python)

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

Buggy submission (verdict: Runtime Error):
import bisect

N = int(input())
A = [int(input()) for i in range(N)]

ans = 1
X = [-A[0]]
for i in range(1,N):
    if -X[ans-1] >= A[i]:
        X.append(-A[i])
        ans += 1
    else:
        pos = bisect.bisect_left(X,-A[i])
        X[pos] = -A[i]

print(ans)
Problem p02972 (python)

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

for i in range(N-1,-1,-1):
    A[i] = sum(A[i::i+1]) % 2

s = sum(A[0:N])
print(s)

n = 1
for i in range(N):
    if A[i] == 1:
        if n == s:
            print(i+1)
            break
        else:
            print(i+1,end=' ')
            n += 1

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

for i in range(N-1,0,-1):
    A[i] = sum(A[i::i+1]) % 2

s = sum(A[0:N])
print(s)

n = 1
for i in range(N):
    if s == 0:
        print('')
        break
    if A[i] == 1:
        if n == s:
            print(i+1)
            break
        else:
            print(i+1,end=' ')
            n += 1

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

for i in range(N-1,0,-1):
    A[i] = sum(A[i::i+1]) % 2

s = sum(A[0:N])
print(s)

n = 1
for i in range(N):
    if s == 0:
        print('')
    if A[i] == 1:
        if n == s:
            print(i+1)
            break
        else:
            print(i+1,end=' ')
            n += 1

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

for i in range(N,1,-1):
    A[i-1] = sum(A[i-1::i]) % 2

print(sum(A[0:N]))

n = 1
for i in range(N):
    if A[i] == 1:
        if n == sum(A[0:N]):
            print(i+1)
        else:
            print(i,end=' ')
            n += 1
Problem p02982 (python)

Fixed submission:
import math
N,D = map(int,input().split())
X = [list(map(int,input().split())) for i in range(N)]

ans = 0
for j in range(N):
    for i in range(j):
        distant2 = 0
        for k in range(D):
            distant2 += (X[j][k]-X[i][k])**2
        if math.sqrt(distant2) % 1 == 0:
            ans += 1

print(ans)

Buggy submission (verdict: Runtime Error):
import math
N,D = map(int,input().split())
3 2
X = [list(map(int,input().split())) for i in range(N)]
1 2
5 5
-2 8

ans = 0
for j in range(N):
    for i in range(j):
        distant2 = 0
        for k in range(D):
            distant2 += (X[j][k]-X[i][k])**2
        if math.sqrt(distant2) % 1 == 0:
            ans += 1

print(ans)
Problem p02988 (python)

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

large_small = 2
ans = 0
for i in range(n-1):
    if p[i] > p[i+1]:
        if large_small == 1:
            ans += 1
        large_small = 1
    elif p[i] < p[i+1]:
        if large_small == -1:
            ans += 1
        large_small = -1
    else:
        large_small = 0

print(ans)

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

large_small = -1
ans = 2
for i in range(n-1):
    if p[i] > p[i+1]:
        if large_small == 1:
            ans += 1
        large_small = 1
    elif p[i] < p[i+1]:
        if large_small == -1:
            ans += 1
        large_small = -1
    else:
        large_small = 0

print(ans)
Problem p02995 (python)

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

C_mod0 = B//C - (A-1)//C
D_mod0 = B//D - (A-1)//D
i = D
j = C % D
while j > 0:
    k = j
    j = i % j
    i = k

CD_mod0 = B*i // (C*D) - (A-1)*i // (C*D)
Total = B - A + 1
ans = Total - C_mod0 - D_mod0 + CD_mod0

print(ans)

Buggy submission (verdict: Runtime Error):
from fractions import gcd
A,B,C,D = map(int,input().split())

C_mod0 = B//C - (A-1)//C
D_mod0 = B//D - (A-1)//D
CD_mod0 = B*math.gcd(C,D)//(C*D) -(A-1)*math.gcd(C,D)//(C*D)
Total = B - A + 1
ans = Total - C_mod0 - D_mod0 + CD_mod0

print(ans)

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

C_mod0 = B//C - (A-1)//C
D_mod0 = B//D - (A-1)//D
CD_mod0 = B*math.gcd(C,D)//(C*D) -(A-1)*math.gcd(C,D)//(C*D)
Total = B - A + 1
ans = Total - C_mod0 - D_mod0 + CD_mod0

print(ans)

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

C_mod0 = B//C - (A-1)//C
D_mod0 = B//D - (A-1)//D
CD_mod0 = B*math.gcd(C,D)//(C*D) -(A-1)*math.gcd(C,D)//(C*D)
Total = B - A + 1
ans = Total - C_mod0 - D_mod0 + CD_mod0
print(ans)

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

C_mod0 = B//C - (A-1)//C
D_mod0 = B//D - (A-1)//D
CD_mod0 = B*math.gcd(C,D)//(C*D) -(A-1)*math.gcd(C,D)//(C*D)
Total = B - A + 1
ans = Total - C_mod0 - D_mod0 + CD_mod0
print(ans)
Problem p03061 (python)

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

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

right_gcd = [0]*(n)
left_gcd = [0]*(n)
right_gcd[n-1] = a[n-1]
left_gcd[0] = a[0]

for i in range(n-1,0,-1):
    right_gcd[i-1] = gcd(right_gcd[i],a[i-1])

for i in range(n-1):
    left_gcd[i+1] = gcd(left_gcd[i],a[i+1])

except_gcd = [0]*n
for i in range(n):
    if i == 0:
        except_gcd[i] = right_gcd[1]
    elif i == n-1:
        except_gcd[i] = left_gcd[n-2]
    else:
        except_gcd[i] = gcd(left_gcd[i-1],right_gcd[i+1])

print(max(except_gcd))

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

right_gcd = [0]*(n)
left_gcd = [0]*(n)
right_gcd[n-1] = a[n-1]
left_gcd[0] = a[0]

for i in range(n-1,0,-1):
    right_gcd[i-1] = math.gcd(right_gcd[i],a[i-1])

for i in range(n-1):
    left_gcd[i+1] = math.gcd(left_gcd[i],a[i+1])

gcd = [0]*n
for i in range(n):
    if i == 0:
        gcd[i] = right_gcd[1]
    elif i == n-1:
        gcd[i] = left_gcd[n-2]
    else:
        gcd[i] = math.gcd(left_gcd[i-1],right_gcd[i+1])

print(max(gcd))

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

right_gcd = [0]*(n)
left_gcd = [0]*(n)
right_gcd[n-1] = a[n-1]
left_gcd[0] = a[0]

for i in range(n-1,0,-1):
    right_gcd[i-1] = math.gcd(right_gcd[i],a[i-1])

for i in range(n-1):
    left_gcd[i+1] = math.gcd(left_gcd[i],a[i+1])

gcd = [0]*n
for i in range(n):
    if i == 0:
        gcd[i] = right_gcd[1]
    elif i == n-1:
        gcd[i] = left_gcd[n-2]
    else:
        gcd[i] = math.gcd(left_gcd[i-1],right_gcd[i+1])

print(max(gcd))
Problem p03074 (python)

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

if s[0] == '1':
    length_01 = [0]
else:
    length_01 = [0,0]

for i in range(n-1):
    if s[i] != s[i+1]:
        length_01.append(i+1)

if s[n-1] == '1':
    length_01.append(n)
else:
    length_01.append(n)
    length_01.append(n)

num_0 = int(len(length_01)/2)
if num_0 - k >= 1:
    answer = 0
    for i in range(num_0 - k):
        if answer < length_01[2*(i+k)+1] - length_01[2*i]:
            answer = length_01[2*(i+k)+1] - length_01[2*i]
else:
    answer = n

print(answer)

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


if s[0] == '1':
    length_01 = [0]
else:
    length_01 = [0,0]

for i in range(n-1):
    if s[i] != s[i+1]:
        length_01.append(i+1)

if s[n-1] == '0':
    length_01.append(n-1)

num_0 = int((len(length_01)+1)/2)
if num_0 - 1 >= k:
    answer = 0
    for i in range(num_0):
        if answer < length_01[2*(i+k)] - length_01[2*i] + 1:
            answer = length_01[2*(i+k)] - length_01[2*i] + 1
else:
    answer = n

print(answer)
Problem p03087 (python)

Fixed submission:
n,q = map(int,input().split())
s = input()
lr = list(list(map(int,input().split())) for i in range(q))

x = [0]*(n)
for i in range(n-1):
    if s[i] == 'A':
        if s[i+1] == 'C':
            x[i+1] = x[i] + 1
        else:
            x[i+1] = x[i]
    else:
        x[i+1] = x[i]

for i in range(q):
    print(x[lr[i][1]-1]-x[lr[i][0]-1])

Buggy submission (verdict: Runtime Error):
n,q = map(int,input().split())
s = input()
lr = list(list(map(int,input().split())) for i in range(q))

x = [0]*(n-1)
for i in range(n):
    if s[i] == 'A' and s[i+1] == 'C':
        x[i] = 1

for i in range(q):
    print(sum(x[(lr[i][0]-1):(lr[i][1]-1)]))

Buggy submission (verdict: Runtime Error):
n,q = map(int,input().split())
8 3
s = input()
ACACTACG
lr = list(list(map(int,input().split())) for i in range(q))
3 7
2 3
1 8

x = [0]*(n-1)
for i in range(n):
    if s[i] == 'A' and s[i+1] == 'C':
        x[i] = 1

for i in range(q):
    print(sum(x[(lr[i][0]-1):(lr[i][1]-1)]))

Buggy submission (verdict: Runtime Error):
n,q = map(int,input().split())
s = input()
lr = list(list(map(int,input().split())) for i in range(q))

x = [0]*(n-1)
for i in range(n):
    if s[i] == 'A' and s[i+1] == 'C':
        x[i] = 1

for i in range(q):
    print(sum((x[(lr[i][0]-1):(lr[i][1]-1)])))
Problem p03106 (python)

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

number = 0
for i in range(min(a,b),0,-1):
    if a % i == 0 and b % i == 0:
        number += 1
        if number == k:
            print(i)
            break

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

number = 0
for i in range(min(a,b),0,-1):
    if a % i == 0 and b % i == 0:
        number += 1
        if number == k:
            print(i)
            break

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

number = 0
for i in range(min(a,b),0,-1):
    if a % i == 0 and b % i == 0:
        number += 1
        if number == k:
            print(i)
            break
Problem p03126 (python)

Fixed submission:
n,m = map(int,input().split())
ka = list(list(map(int,input().split())) for _ in range(n))

like = [0]*m
for i in range(n):
    for j in range(1,ka[i][0]+1):
        like[ka[i][j]-1] += 1

answer = 0
for i in range(m):
    if like[i] == n:
        answer += 1

print(answer)

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

x = [a[1],a[0],a[1] % a[0]]
a.sort()
for i in range(1,n+1):
    while x[2] > 0:
        x[0] = x[1]
        x[1] = x[2]
        x[2] = x[0] % x[1]
    x[0] = a[i+1]
    x[2] = x[0] % x[1]

print(x[1])

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
ka = list(list(map(int,input().split())) for _ in range(n))

like = [0]*m
for i in range(n):
    for j in range(1,ka[i][0]+1):
        like[ka[i][j]] += 1

answer = 0
for i in range(m):
    if like[i] == n:
        answer += 1

print(answer)
Problem p03324 (python)

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

Buggy submission (verdict: Runtime Error):
D,N=map(int,input().split())
for _ in range(D):
    N *= 100
print(int(N)
Problem p03377 (python)

Fixed submission:
x,y,z=map(int,input().split())
if x <= z <= x+y :
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
x,y,z=map(int,input().split())
if x <= z and x+y => z :
  print("YES")
else:
  print("NO")
Problem p03385 (python)

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

Buggy submission (verdict: Runtime Error):
S=input()
print( "Yes" if S in "abc"  or S in "bca" or S in "acb" S in "cab" or S in "cba" or S in "bac" else "No" )
Problem p03485 (python)

Fixed submission:
a = [int(i) for i in input().split()]
print(-(-(a[0]+ a[1] )//2))

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

a,b = map(int,input().split())
print(round(np.mean(a,b)))
Problem p03501 (python)

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

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
print(a+b if a+B<=c else c)

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input.split())
print(a+b if a+B<=c else c)
Problem p03679 (python)

Fixed submission:
X,A,B = map(int,input().split())
 
if B-A <=0:
    print("delicious")
elif B - A - X <=0:
    print("safe")
else:
    print("dangerous")

Buggy submission (verdict: Runtime Error):
X,A,B = map(int,input().split())
 
if A > B:
    print("delicious")
elif A < B and B-A < X+1:
    print("safe")
elif A < B and B-A > X+1
    print("dangerous")
Problem p03852 (python)

Fixed submission:
c=input()
if c in 'aeiou':
     print("vowel")
else:
     print("consonant")

Buggy submission (verdict: Runtime Error):
c=input()
if c == "a" = "i" = "u" = "e" = "o":
    print("vowel")
else:
    print("consonant")

Buggy submission (verdict: Runtime Error):
c=input()
if c == a or i or u or e or o:
    print("vowel")
else:
    print("consonant")
Problem p02724 (python)

Fixed submission:
N=int(input())
Hapt=0
if(N>=5):
  Hapt=Hapt+(N//500)*1000 + ((N%500)//5)*5
else:
  Hapt=0
print(Hapt)

Buggy submission (verdict: Runtime Error):
N=int(input())
Happoint=(N//500)*1000 + ((n%500)//5)*5
print(int(Happoint))
Problem p03280 (python)

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

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
Ans = (A-1)*(B-1)
print(Ans)
Problem p03294 (python)

Fixed submission:
import math
from functools import reduce

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

def gcd(x,y):
    if x > y:
        x , y = y , x
    while x>0:
        x, y = y%x , x
    return y
    
def lcm_base(x, y):
    return (x * y) // gcd(x, y)

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


m =  lcm_list(A) -1

B = 0

for j in range(len(A)):
    B += m%A[j]

print(B)

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

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


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

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


m =  lcm_list(A) -1

B = 0

for j in range(len(A)):
    B += m%A[j]

print(B)

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

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


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

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


m =  lcm_list(A) -1

B = 0

for j in range(len(A)):
    B += m%A[j]

print(B)

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

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


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

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


m =  lcm_list(A) -1

B = 0

for j in range(len(A)):
    B += m%A[j]

print(B)
Problem p03337 (python)

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

x = a+b
y= a-b
z = a *b

print(max(x,y,z))

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

Ans = 0

for i in range(len(S)):
	X = set(S[:i])
	Y=set(S[i:])
	numAND = len(X & Y)
	if numAND >= Ans:
		Ans = numAND
print(Ans)
Problem p02717 (python)

Fixed submission:
x, y, z = map(int, input().split())
 
x_ = y
y_ = x
 
x__ = z
z_ = x_
 
print(x__, y_, z_)

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

subitem1 = a
a = b
b = subitem1

subitem2 = a
a = c
c = subitem2

print(a,b,c)