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

Fixed submission:
s = input()
count= 0

for i in range(3):
    if s[i] == s[i+1]:
        count += 1
    else:
        pass
if count>0:
    print("Bad")
else:
    print("Good")

Buggy submission (verdict: Runtime Error):
def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
def baisu(x,a):
    return int(x//a)
a,b,c,d = map(int,input().split())

to_a = a - baisu(a,c) - baisu(a,d) + baisu(a,c*d/gcd(c,d))
to_b = b - baisu(b,c) - baisu(b,d) + baisu(b,c*d/gcd(c,d))



if a%c == 0 or a%d == 0:
    print(int(to_b - to_a))
else:
    print(int(to_b-to_a+1))

Buggy submission (verdict: Runtime Error):
def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
def baisu(x,a):
    return int(x//a)
a,b,c,d = map(int,input().split())

to_a = a - baisu(a,c) - baisu(a,d) + baisu(a,c*d/gcd(c,d))
to_b = b - baisu(b,c) - baisu(b,d) + baisu(b,c*d/gcd(c,d))


if a%c == 0 or a%d == 0:
    print(int(to_b - to_a))
else:
    print(int(to_b-to_a+1))

Buggy submission (verdict: Runtime Error):
def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
def baisu(x,a):
    if x%a ==0:
        return int(x//a)
    else:
        x -=1
        return baisu(x,a)

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

to_a = a - baisu(a,c) - baisu(a,d) + baisu(a,c*d/gcd(c,d))
to_b = b - baisu(b,c) - baisu(b,d) + baisu(b,c*d/gcd(c,d))


print(int(to_b-to_a+1))
Problem p02995 (python)

Fixed submission:
def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
def baisu(x,a):
    return int(x//a)
a,b,c,d = map(int,input().split())

to_a = a-1 - baisu(a-1,c) - baisu(a-1,d) + baisu(a-1,c*d//gcd(c,d))
to_b = b - baisu(b,c) - baisu(b,d) + baisu(b,c*d//gcd(c,d))

print(to_b - to_a)

Buggy submission (verdict: Runtime Error):
def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
def baisu(x,a):
    if x%a ==0:
        return int(x//a)
    else:
        x -=1
        return baisu(x,a)

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

to_a = a - baisu(a,c) - baisu(a,d) + baisu(a,c*d/gcd(c,d))
to_b = b - baisu(b,c) - baisu(b,d) + baisu(b,c*d/gcd(c,d))

if a%c == 0 or a%d == 0:
    print(int(to_b - to_a))
else:
    print(int(to_b-to_a+1))

Buggy submission (verdict: Runtime Error):
import math
def baisu(x,a):
    if x%a ==0:
        return int(x//a)
    else:
        x -=1
        return baisu(x,a)

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

to_a = a - baisu(a,c) - baisu(a,d) + baisu(a,c*d/math.gcd(c,d))
to_b = b - baisu(b,c) - baisu(b,d) + baisu(b,c*d/math.gcd(c,d))

if a%c == 0 or a%d == 0:
    print(int(to_b - to_a))
else:
    print(int(to_b-to_a+1))

Buggy submission (verdict: Runtime Error):
def baisu(x,a):
    if x%a ==0:
        return int(x//a)
    else:
        x -=1
        return baisu(x,a)

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

to_a = a - baisu(a,c) - baisu(a,d) + baisu(a,c*d)
to_b = b - baisu(b,c) - baisu(b,d) + baisu(b,c*d)

if a%c == 0 or a%d == 0:
    print(int(to_b - to_a))
else:
    print(int(to_b-to_a+1))

Buggy submission (verdict: Runtime Error):
def baisu(x,a):
    if x%a ==0:
        return int(x//a)
    else:
        x -=1
        return baisu(x,a)

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

to_a = a - baisu(a,c) - baisu(a,d) + baisu(a,c*d)
to_b = b - baisu(b,c) - baisu(b,d) + baisu(b,c*d)

print(int(to_b -to_a))
Problem p02999 (python)

Fixed submission:
lists = []
lists = input().split(" ")
if int(lists[0])<int(lists[1]):
  print(0)
else:
  print(10)

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

count = 1
d = 0
for i in range(N):
        da = d + int(l_list[i])
        d = da
        if da <= X:
                count +=1
        else:
                print(count)
                break

Buggy submission (verdict: Runtime Error):
d_list = [0]
N,X = input().split(" ")
l_list = input().split(" ")

for i in range(int(len(l_list))):
    num = int(d_list[i]) + int(l_list[i])
    d_list.append(num)
    

for i in range(int(len(d_list)-1)):
    if d_list[i]<=int(X)< d_list[i+1]:
        print(i+1)

    elif int(X)>d_list[-1]:
            print(int(d_list))

Buggy submission (verdict: Runtime Error):
lists = []
lists = input.split(" ")
if int(lists[0])<int(lists[1]):
  print(0)
else:
  print(10)

Buggy submission (verdict: Runtime Error):
lists = []
lsits = input.split(" ")
if lists[0]<lists[1]:
  print(0)
else:
  print(10)

Buggy submission (verdict: Runtime Error):
if X<A:
  print(0)
else:
  print(10)
Problem p03000 (python)

Fixed submission:
N,X = map(int,input().split(" "))
l_list = input().split()

count = 1
d = 0
for i in range(N):
        da = d + int(l_list[i])
        d = da
        if da <= X:
                count +=1
        else:

                print(count)
                break
        if count == int(N) + 1:
                print(count)

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

count = 1
d = 0
for i in range(N):
        d_a = d + int(l_list[i])
        d = d_a
        if d_a <= X:
                count +=1
        else:
                print(count)
            　　break
Problem p03031 (python)

Fixed submission:
n,m = map(int,input().split())
info_list=[]
for i in range(m):
    info_list.append(list(map(int,input().split())))
p_list = list(map(int,input().split()))

count= 0

for i in range(2**n):
    swith = str(bin(i))[2:]
    swith_num = swith.zfill(n) 
    for j in info_list:
        flag = 0
        swith_sum = 0
        for k in j[1:]:
            swith_sum += int(swith_num[int(k)-1])
        if swith_sum%2 == p_list[info_list.index(j)]:
            pass
        else:
            flag = 1
            break
    if flag == 0:        
        count += 1

print(count)

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

count= 0

for i in range((n)**2):
    swith = str(bin(i))[2:]
    swith_num = swith.zfill(m) 
    for j in info_list:
        flag = 0
        swith_sum = 0
        for k in j[1:]:
            swith_sum += int(swith_num[int(k)-1])
        if swith_sum%2 == p_list[info_list.index(j)]:
            pass
        else:
            flag = 1
            break
    if flag == 0:        
        count += 1

print(count)
Problem p03059 (python)

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

Buggy submission (verdict: Runtime Error):
B*((T+0.5)//A)
Problem p03076 (python)

Fixed submission:
lists = []
for i in range(5):
	lists.append(input())

f_list = []
for i in lists:
	f_list.append(i[-1])

mins = 10
if not "0" in f_list:
    mins = int(min(f_list))
elif len(set(f_list)) == 1:
    pass
else:
    mins = int(sorted(set(f_list))[1])
sums = 0
for i in lists:
	sums += int((int(i)+9)/10)*10


print(sums-10+mins)

Buggy submission (verdict: Runtime Error):
lists = []
for i in range(5):
	lists.append(input())

f_list = []
for i in lists:
	f_list.append(i[-1])

mins = 0
if not "0" in f_list:
    mins = int(min(f_list))
else:
    mins = int(sorted(set(f_list))[1])
sums = 0
for i in lists:
	sums += int((int(i)+9)/10)*10


print(sums-10+mins)
Problem p03086 (python)

Fixed submission:
s = input()
num = []
lists = ["A","C","G","T"]
count = 0

for i in range(len(s)):
    if s[i] in lists:
        count +=1
    else:
        num.append(count)
        count = 0
else:
    num.append(count)
print(max(num))

Buggy submission (verdict: Runtime Error):
s = input()
num = []
lists = ["A","c","G","T"]
count = 0

for i in range(len(s)):
    if s[i] in lists:
        count +=1
    else:
        num.append(count)
print(max(num))

Buggy submission (verdict: Runtime Error):
s = input()
num = []
lists = ["A","c","G","T"]
count = 0

for i in range(len(s)):
    if s[i] in lists:
        count +=1
    else:
        num.append(count)
print(max(num))
Problem p03136 (python)

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

ma = max(lists)
if sum(lists) - ma >ma:
    print("Yes")
else:
    print("No")

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

ma = max(lists)
if sum(lists) - ma >ma:
    print("YES")
else:
    print("NO")
Problem p03145 (python)

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

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,input(.split()))
print(a*b/2)

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,input(.split()))
print(a*B/2)

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,input(.split()))
print(a/(b*2))
Problem p03238 (python)

Fixed submission:
n = int(input())
if n ==1:
    print("Hello World")
elif n ==2:
    a = int(input())
    b = int(input())
    print(a+b)

Buggy submission (verdict: Runtime Error):
n = int(input())
if n ==1:
    print("Hello World")
elif n ==2:
    a,b = map(int,input().split())
    print(a+b)

Buggy submission (verdict: Runtime Error):
n = int(input())
if n ==1:
    print("Hello World")
else:
    a,b = map(int,input().split())
    print(a+b)

Buggy submission (verdict: Runtime Error):
n = int(input())
if n ==1:
    print("Hello World")
else:
    a,b = map(int,input().split())
    print(a+b)
Problem p02993 (python)

Fixed submission:
a = list(map(str,input().split()))
i = a[0]

lst = list(i)

flag = 0;
for k in range(3):
  if lst[k] == lst[k+1]:
    flag = 1
    
if flag == 1:
  print("Bad")
else:
  print("Good")

Buggy submission (verdict: Runtime Error):
a = list(map(int,input().split()))
i = a[0]

lst = []
while i > 0:
    lst.append(i%10)
    i //= 10 # 必須
lst.reverse()

flag = 0;
for k in range(3):
  if lst[k] == lst[k+1]:
    flag = 1
    
if flag == 1:
  print("Bad")
else:
  print("Good")
Problem p02994 (python)

Fixed submission:
a = list(map(int,input().split()))
N = a[0]
L = a[1]
  

 
def if_test(N,L):
  taste = 0
  if L > 0:
     for i in range(N):
      taste += (L + i)
#      print("L>0"+str(taste))
       
     taste = taste - L
     print(taste)
      
  elif (L+N-1) < 0:
     for i in range(N):
      taste = taste + L + i 
#      print("<0"+str(taste))
          
     taste = taste - (L + N - 1)   
     print(taste)
        
  else:
     for i in range(N):
      taste = taste + L + i
#      print(taste)
     print(taste)
    
if_test(N,L)

Buggy submission (verdict: Runtime Error):
a = list(map(int,input().split()))
N = a[0]
L = a[1]

taste = 0

def if_test(N,L):
    if L > 0:
     for i in range(N):
      taste = taste + L + i
       
     taste = taste - L
     print(taste)
      
    elif L+N-1 < 0:
     for i in range(N):
      taste = taste + L + i 
          
     taste = taste - (L + N - 1)   
     print(taste)
        
    else:
     for i in range(N):
      taste = taste + L + i
      
     print(taste)
    
if_test(L,N)
Problem p02975 (python)

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

a_unique = list(set(a))

if n == 3:
    if a_unique[0]^a_unique[1] == a_unique[2]:
        result = True
    
elif len(a_unique) == 3:
    if a_unique[0]^a_unique[1] == a_unique[2]: 
        if a.count(a_unique[0]) == a.count(a_unique[1]) and a.count(a_unique[1]) == a.count(a_unique[2]):
            result = True

elif len(a_unique) == 1:
    if a_unique[0]^a_unique[0] == a_unique[0]:
        result = True

elif len(a_unique) == 2:
    if a_unique.count(a_unique[0]) == 1:
        if a_unique[0]^a_unique[1] == a_unique[1]:
            if a_unique[1]^a_unique[1] == a_unique[0]:
                if a.count(a_unique[0])*2 == a.count(a_unique[1]):
                    result = True
    elif  a_unique.count(a_unique[1]) == 1:
        if a_unique[0]^a_unique[1] == a_unique[0]:
            if a_unique[0]^a_unique[0] == a_unique[1]:
                if a.count(a_unique[1])*2 == a.count(a_unique[0]):
                    result = True

if len(a_unique) > 3:
    result = False    
            
if result:
    print("Yes")
else:
    print("No")

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


if a[0]^a[1] == a[2]:
    if a[1]^a[2] == a[3]:
        if a[n-2]^a[n-1] == a[0]:
            if a[n-1]^a[0] == a[1]:
                result = True

if result:
    print("Yes")
else:
    print("No")

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

a_unique = list(set(a))
for i in range(n-1):
    for j in range(i+1,n):
        if a_unique[i]^a_unique[j] in a:
            pass
        else:
            result = False

a_unique = list(set(a))
if len(a_unique) > 3:
    result = False

if result == True:
    print("Yes")
else:
    print("No")
Problem p02993 (python)

Fixed submission:
s=input()
result = True

for i in range(3):
    if s[i]==s[i+1]:
        result = False
if result:
    print('Good')
else:
    print('Bad')

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

i = b//c- (a-1)//c
j = b//d- (a-1)//d

f=fractions.gcd(c,d)
f2= c * d / f
k = b//f2 - (a-1)//f2

pot = i + j - k

print(b-(a-1)-pot)
Problem p02995 (python)

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

i = b//c- (a-1)//c
j = b//d- (a-1)//d

f=fractions.gcd(c,d)
f2= int(c * d / f)
k = b//f2 - (a-1)//f2

pot = i + j - k

print(b-(a-1)-pot)

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

i = (b//c- a//c)
j = (b//d- a//d)

f=math.gcd(c,d)
f2= c * d / math.gcd(c, d)
k = b//f2 - a//f2

count = int(i + j - k)

print(b-a+1-count)

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

i = ((b- a)//c)+1
j = ((b- a)//d)+1

f=math.gcd(c,d)
k = c*d//f

count = i + j - f

print(b-a+1-count)
Problem p03076 (python)

Fixed submission:
# -*- coding: utf-8 -*-

import math

li = []
for i in range(5):
    li.append(int(input()))

s = 0
for f in li:
    s += (f//10)*10 + 10*(int(bool(f%10)))

li2 = []
for f in li:
    if f%10 != 0:
        li2.append(f%10)
if len(li2) == 0:
    li2.append(10)
print(s + min(li2) - 10)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

import math

li = []
for i in range(5):
    li.append(int(input()))

s = 0
for f in li:
    s += (f//10)*10 + 10*(int(bool(f%10)))

li2 = []
for f in li:
    if f%10 != 0:
        li2.append(f%10)

print(s + min(li2) - 10)
Problem p03795 (python)

Fixed submission:
n = int(input())
x = 800 * n
y = n / 15 * 200

print(x - y)

Buggy submission (verdict: Runtime Error):
n = input()
x = 800 * n
y = n / 15 * 200

print(x - y)
Problem p03796 (python)

Fixed submission:
power = 1
n = int(input())
tmp = 10 ** 9 + 7

for i in range(n):
    power = power * (i + 1) % tmp

print(power)

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

power = 1
n = int(input())
tmp = 10 ** 9 + 7

for i in range(n):
    power = power * (i + 1)

print(power % tmp)

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

power = 1
n = int(input())
tmp = 10 ** 9 + 7

for i in range(n):
    power = power * (i + 1)

print(power % tmp)

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

power = 1
n = int(input())
tmp = 10 ** 9 + 7

for i in range(n):
    power = power * (i + 1)

print(power % tmp)
Problem p03101 (python)

Fixed submission:
W,H = map(int,input().split())
w,h = map(int,input().split())
print((W-w)*(H-h))

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
A = []
B = []
r = 0
for i in range(N):
  a,b = map(int,input().split())
  A.append(a)
  B.append(b)
while M > 0:
  cnt = 1000000001
  cnt2 = 0
  for i in range(N):
    if (A[i] < cnt) and (B[i] != 0):
      cnt = A[i]
      cnt2 = i
  M -= B[cnt2]
  r += A[cnt2]*B[cnt2]
  B[cnt2] = 0
  if M < 0:
    r -= abs(M)*A[cnt2]
  A[cnt2] = 0
print(r)
Problem p03210 (python)

Fixed submission:
S=int(input())
if (S==3) or (S==5) or (S==7):
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
S= input()
if S==3 or S==5 or S==7:
  print(Yes)
else:
  print(No)
Problem p02983 (python)

Fixed submission:
L,R = map(int,input().split())
ans = 100000000
for i in range(L,R + 1):
    if ans == 0:
        break
    for j in range(i + 1,R + 1):
        if i*j % 2019 < ans:
            ans = i*j % 2019
            if ans == 0:
                break
print(ans)

Buggy submission (verdict: Runtime Error):
L,R = map(int,input().split())
ans = 100000000
for i in range(L,R + 1):
    for j in range(i + 1,R + 1):
        if i*j % 2019 < ans:
            ans = i*j % 2019
            if ans == 0:
                print(ans)
                sys.exit
print(ans)
Problem p03047 (python)

Fixed submission:
N,M = map(int,input().split())
print(N - M + 1)

Buggy submission (verdict: Runtime Error):
N = int(input())
M = int(input())
print(N - M + 1)
Problem p03399 (python)

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
ans = 0
if a > b:
  ans += b
else:
  ans += a
if c > d:
  ans += d
else:
  ans += c
print(ans)

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
ans = 0
if a > b:
  ans += a
else:
  ans += b
if c > d
  ans += c
else:
  ans += d
print(ans)

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

Buggy submission (verdict: Runtime Error):
a,b,c,d = map(int,input().split())
ans = 0
if a > b:
  ans += a
  else:
    ans += b
if c > d
  ans += c
  else:
    ans += d
print(ans)
Problem p03416 (python)

Fixed submission:
import math
A,B = map(int,input().split())
ans = 0
for i in range (A,B+1):
    s = str(i)
    kai = True
    for j in range (0, math.ceil(len(s)/2)):
        if s[j] != s[-j - 1]:
            kai = False
            break
    if kai == True:
        ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
import math
A,B = map(int,input().split())
ans = 0
for i in range (A,B+1):
    s = str(i)
    kai = True
    for j in range (0, math.celi(len(s)/2)):
        if s[j] != s[-j - 1]:
            kai = False
            break
    if kai == True:
        ans += 1
print(ans)
Problem p03423 (python)

Fixed submission:
N = int(input())
if N % 3 >= 1:
	print(N // 3)
else:
	print(N//3)

Buggy submission (verdict: Runtime Error):
N = int(input())
if N % 3 => 1:
	print((N // 3 ) + 1)
else:
	print(N//3)
Problem p03448 (python)

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

ans = 0
for a in range(A + 1):
    for b in range(B + 1):
        for c in range(C + 1):
            if 500 * a + 100 * b + 50 * c == X:
                ans += 1

print(ans)

Buggy submission (verdict: Runtime Error):
A, B, C, X = map(int, input().split())
I = 0
for i in range(A + 1):
	for j in range(B + 1):
		for k in range(C + 1):
			if (500 * i) + (100 * j) + (50 * k) == X:
				I++
for i in range(C + 1):
	for j in range(B + 1):
		for k in range(A + 1):
			if (500 * i) + (100 * j) + (50 * k) == X:
				I++
for i in range(B + 1):
	for j in range(A + 1):
		for k in range(C + 1):
			if (500 * i) + (100 * j) + (50 * k) == X:
				I++
for i in range(A + 1):
	for j in range(C + 1):
		for k in range(B + 1):
			if (500 * i) + (100 * j) + (50 * k) == X:
				I++
for i in range(C + 1):
	for j in range(A + 1):
		for k in range(B + 1):
			if (500 * i) + (100 * j) + (50 * k) == X:
				I++
for i in range(B + 1):
	for j in range(C + 1):
		for k in range(A + 1):
			if (500 * i) + (100 * j) + (50 * k) == X:
				I++
print(I)

Buggy submission (verdict: Runtime Error):
A, B, C, X = map(int, input().split())
I = 0
for i in range(A + 1):
	for j in range(B + 1):
		for k in range(C + 1):
			if (500 * i) + (100 * j) + (50 * k) == X:
				I++
print(I)

Buggy submission (verdict: Runtime Error):
A, B, C, X = map(int, input().split())
I = 0
for i in range(A + 1):
	for j in range(B + 1):
		for k in range(C + 1):
			if 500 * i + 100 * j + 50 * k == X:
			I++
print(I)

Buggy submission (verdict: Runtime Error):
A, B, C, X = map(int, input().split())
I = 0
for i in range(A + 1):
	for j in range(B + 1):
		for k in range(C + 1):
			if 500 * i + 100 * j + 50 * k == X:
		I++
print(I)
Problem p03477 (python)

Fixed submission:
a,b,c,d = map(int,input().split())
l = a + b
r = c + d
if l > r:
	print("Left")
elif l < r:
	print("Right")
elif l == r:
	print("Balanced")

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,input().split())
if a == b:
	print(c)
elif a == c:
	print(b)
elif b == c:
	print(a)
	
a,b,c,d = map(int,input().split())
l = a + b
r = c + d
if l > r:
	print("Left")
elif l < r:
	print("Right")
elif l == r:
	print("Balanced")
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().split())
if a == b
	print(c)
else if a == c
	print(b)
else if b == c
	print(a)
Problem p03609 (python)

Fixed submission:
x,n = map(int,input().split())
ans = x - n
if ans < 0:
	print(0)
else:
	print(ans)

Buggy submission (verdict: Runtime Error):
ans = int(input()) - int(input())
if ans < 0:
	print(0)
else:
	print(ans)
Problem p03693 (python)

Fixed submission:
r, g, b = map(int, input().split())
ans = 0
ans = r * 100 + g * 10 + b
if ans % 4 == 0:
	print("YES")
else:
	print("NO")

Buggy submission (verdict: Runtime Error):
r, g, b = map(int, input().split())
ans = 0
ans += r * 100 + g * 10 + b
if ans % 4 = 0:
	print("YES")
else:
	print("NO")

Buggy submission (verdict: Runtime Error):
r, g, b = map(int, input().split())
ans = 0
ans += r * 100 + g * 10 + b
if ans % 4 = 0:
  print("YES")
  else:
    print("NO")
Problem p03729 (python)

Fixed submission:
A, B, C = input().split()
if A[-1] == B[0] and B[-1] == C[0]:
  print("YES")
else :
  print("NO")

Buggy submission (verdict: Runtime Error):
A, B, C = map(int, input().split())
if A[-1] == B[0] and B[-1] == C[0]:
  print("YES")
else :
  print("NO")

Buggy submission (verdict: Runtime Error):
A, B, C = map(int, input().split())
if A[-1] == B[0] && B[-1] == C[0]:
  print("YES")
else :
  print("NO")
Problem p03760 (python)

Fixed submission:
o = input()
e = input()
ans = ""
for i in range(len(o)):
  ans += o[i]
  if len(e) > i:
    ans += e[i]
print(ans)

Buggy submission (verdict: Runtime Error):
o = input()
e = input()
ans = ""
for i in len(o):
  ans += o[i]
  if len(e) > i:
    ans += e[i]
print(ans)

Buggy submission (verdict: Runtime Error):
o = input()
e = input()
ans = ""
for i in o:
  ans += o[i]
  if len(e) > i:
    ans += e[i]
print(ans)

Buggy submission (verdict: Runtime Error):
o = input()
e = input()
ans = ""
for i in o:
  ans += o[i]
	if len(e) > i:
  		ans += e[i]
print(ans)

Buggy submission (verdict: Runtime Error):
o = input()
e = input()
ans = ""
for i in o:
  ans += o[i]
	if ans[i]:
  		ans += e[i]
print(ans)

Buggy submission (verdict: Runtime Error):
o = input()
e = input()
ans = ""
for i in o:
  ans += o[i]
  ans += e[i]
print(ans)
Problem p03294 (python)

Fixed submission:
def gcd(x, y):
 
   while(y):
       x, y = y, x % y
 
   return x

   
n = int(input())

a = list(map(int,input().split()))
lcm = a[0]
for i in a[1:]:
  lcm = (lcm * i) // int(gcd(lcm, i)) 

lcm -= 1
ans = 0
for i in a:
	ans += lcm % i 
print(ans)

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

a = list(map(int,input().split()))
lcm = a[0]
for i in a[1:]:
  lcm = (lcm * i) // int(gcd(lcm, i)) 

lcm -= 1
ans = 0
for i in a:
	ans += lcm % i 
print(ans)