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

Fixed submission:
S = list(input())

if S[2] == S[3] and S[4] == S[5]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
S = list(input())
S =[2:5:1]
coffee = ["f","f","e","e"]
  
if S == coffee:
    print("Yes")
else:
    print("no")

Buggy submission (verdict: Runtime Error):
S = list(input())
coffee = ["c","o","f","f","e","e"]
if S == coffee:
    print("Yes")
  else:
    print("no")
Problem p02725 (python)

Fixed submission:
k,n=map(int,input().split())
a = list(map(int,input().split()))
m = k-a[n-1]+a[0]
for i in range(n-1):
	m = max(m,a[i+1]-a[i])
x = k-m
print(x)

Buggy submission (verdict: Runtime Error):
k,n=int(input().split())
a = list(map(int,input().split()))
m = k-a[n-1]+a[0]
 
for i in range(n-1):
	m = max(m,a[i+1]-m[n])

x = k-m
print(x)

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

for i in range(n-1)
	m = max(m,a[i+1]-m[n])

x = k-m
print(x)
Problem p02766 (python)

Fixed submission:
from sys import stdin
n,k=map(int,input().split())
c=0
while n > 0:
    c += 1
    n=n//k
print(c)

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

n,k=map(int,input().split())
num = n
sum_k = k
for sum_k <= n:
    sum_k= sum_k * k
print(len(sum_k))

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

n,k=map(int,input().split())
num = k
sum_k = n
for sum_k <= n:
    sum_k= sum_k*n
print(len(sumk))
Problem p03011 (python)

Fixed submission:
from sys import stdin

P,Q,R = map(int,input().split())
print(min(P+Q,Q+R,P+R))

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

P,Q,R = int(stdin.readline().rstrip().split())
print(min(P+Q,Q+R,P+R))
Problem p02711 (python)

Fixed submission:
N = input()
if N[-1] == str(7):
    print('Yes')
elif N[-2] == str(7):
    print('Yes')
elif N[-3] == str(7):
    print('Yes')    
else:
    print('No')

Buggy submission (verdict: Runtime Error):
import numpy as np
N = int(input()) 
ai = np.arange(1,(n+1))
result = 0
for i in ai:
    if i % 3 == 0 or i % 5 == 0:
      result += i
print(result)

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

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

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

if a = b = c :
  print('No')
else:
  print('Yes')
Problem p02676 (python)

Fixed submission:
K = int(input())
S = input()
 
if len(S) <= K:
    print(S)
    
else:
    print(S[0:K]+'...')

Buggy submission (verdict: Runtime Error):
K = int(input())
S = input()
 
if len(S) =< len(K):
    print(S)
    
else:
    print(S[1:len(S)]+'...')

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

if len(S) =< len(K):
    print(S)
    
else:
    print((str[1:S])+'...')
Problem p02676 (python)

Fixed submission:
n = int(input())
s = input()
a = len(s)
if a <= n:
  print(s)
else:
  print(s[0:n] + '...')

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()
a = len(s)
if s <= n:
  print(s)
else:
  print(s[0:n-1] + '...')
Problem p02711 (python)

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

Buggy submission (verdict: Runtime Error):
n = list(int,input())
if n[0] == 7 or n[1] == 7 or n[2] == 7
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
n = list(int,input())
if n[0] == 7 or n[1] == 7 or n[2] == 7
  print('Yes')
elif:
  print('No')

Buggy submission (verdict: Runtime Error):
n = list(int,input())
if 7 in n:
  print('Yes')
elif:
  print('No')
Problem p02729 (python)

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

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
print(N * (N -1) //　2 + M * (M - 1) // 2)

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
print(N * (N -1) //　2 + M * (M - 1) // 2
Problem p03135 (python)

Fixed submission:
t, x = map(int, input().split(' '))
print(t / x)

Buggy submission (verdict: Runtime Error):
1 100
Problem p02693 (python)

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

if A % K == 0:
    print('OK')
else:
    m = A // K
    if (m + 1) * K <= B:
        print('OK')
    else:
        print('NG')

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

if B // K < A // K :
    print('OK')
else :
    print('NG')
Problem p02699 (python)

Fixed submission:
s,w = map(int,input().split())
print("safe" if s > w else "unsafe")

Buggy submission (verdict: Runtime Error):
S = input()
n = len(S)
dp = {0:1}
q = 1
p = 0
for i in range(n):
    p += int(S[n-1-i])*q
    q *= 10
    q = q % 2019
    p = p % 2019
    if p not in dp:
        dp[p] = 1
    else:
        dp[p] += 1
print(dp)
print(sum(dp[i]*(dp[i]-1)//2 for i in dp))

Buggy submission (verdict: Runtime Error):
import collections
s_str = input()
s = [int(s_str[i]) for i in range(len(s_str))] #リスト型に文字列を格納します
n = len(s_str)
s_block = []
for k in range(n):
    a = sum(s[i]*10**(n-i-1) for i in range(k,n)) % 2019
    s_block.append(a)
s_dict = list(dict(collections.Counter(s_block)).values())
ans = sum(s_dict[i]*(s_dict[i]-1)/2 for i in range(len(s_dict)))
print(int(ans))
Problem p02701 (python)

Fixed submission:
n = int(input())
s = list(set([input() for _ in range(n)]))
print(len(s) )

Buggy submission (verdict: Runtime Error):
n = int(input())
s = list(set([int(input()) for _ in range(n)]))
print(len(s) )
Problem p03137 (python)

Fixed submission:
n,m = map(int,input().split())
x = list(map(int,input().split()))
if m<=n :
    print(0)
else:
    x_delta=[]
    x.sort()
    for i in range(len(x)-1):
        delta = x[i+1] - x[i]
        x_delta.append(delta)
    print(sum(sorted(x_delta)[:m-n]))

Buggy submission (verdict: Runtime Error):
if m<=n or i ==1:
    print(0)
else:
    n,m = map(int,input().split())
    x = list(map(int,input().split()))
    x_delta=[]
    x.sort()
    for i in range(len(x)-1):
        delta = x[i+1] - x[i]
        x_delta.append(delta)
    print(sum(sorted(x_delta)[:m-n]))
Problem p02777 (python)

Fixed submission:
S, T = input().split()
A, B = map(int, input().split())
U = input()
if U == S:    A -= 1
else: B -= 1
print(A, B)

Buggy submission (verdict: Runtime Error):
red = int(input())
blue = int(input())
ans = input()
if ans=="blue":
  blue--
else:
  red--
print(red)
print(blue)

Buggy submission (verdict: Runtime Error):
red = int(input())
blue = int(input())
ans = input()
if ans=="blue":
  blue--
else:
  red--
Problem p02835 (python)

Fixed submission:
a = [int(x) for x in input().split(" ")]
print("bust") if sum(a) >= 22 else print("win")

Buggy submission (verdict: Runtime Error):
a = [int(x) for x in input().split(" ")]
print("bust") if sum(a) >= 22 else print("win")

Buggy submission (verdict: Runtime Error):
a = [int(x) for x in input().split(" ")]
print("bust") if sum(a) >= 22 else print("win")
Problem p02847 (python)

Fixed submission:
print(7-'SUN,MON,TUE,WED,THU,FRI,SAT'.split(',').index(input()))

Buggy submission (verdict: Runtime Error):
print(7-'SUN,MON,TUE,WED,THU,FRI,SAT'.split().index(input()))
Problem p02676 (python)

Fixed submission:
K = int(input())
S = input()

if len(S) <= K:
    print(S)
else:
    S = S[0:K]+"..."
    print(S)

Buggy submission (verdict: Runtime Error):
K, S = map(str, input().split())
K = int(K)

if len(S) <= K:
    print(S)
else:
    S = S[0:K]+"..."
    print(S)

Buggy submission (verdict: Runtime Error):
K, S = map(str, input().split())
K = int(K)

if len(S) <= K:
    print(S)
else:
    S = (S[0:K]+"..."
    print(S)

Buggy submission (verdict: Runtime Error):
K, S = map(str, input().split())
K = int(K)

if len(S) <= K:
    print(S)
else:
    print(S[0:K]+"...")

Buggy submission (verdict: Runtime Error):
K, S = map(str, input().split())
K = int(K)

print(len(S))
print(K)

print(len(S) >= K)
if len(S) <= K:
    print(S)
else:
    print(S[0:K]+"...")

Buggy submission (verdict: Runtime Error):
K, S = input().split()
K = int(K)

if len(S) <= K:
    print(S)
else:
    print(S[0:K] + '...')

Buggy submission (verdict: Runtime Error):
K, S = input().split()
K = int(k)

if len(s) <= k:
    print(s)
else:
    print(s[0:k] + '...')

Buggy submission (verdict: Runtime Error):
K, S = input().split()
K = int(k)

if len(s) <= k:
    print(s)
else:
    print(s[0:k] + "...")

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

if len(s) <= k:
    print(s)
else:
    print(s[0:k] + "...")

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

if len(s) <= k:
    print(s)
else:
    print(s[0:k] + "...")

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

if len(s) <= k:
    print(s)
else:
    print(s[1:k] + "...")
Problem p02676 (python)

Fixed submission:
K = int(input())
S = input()
if len(S) <= K:
  print(S)
else:
  print(S[:K]+"...")

Buggy submission (verdict: Runtime Error):
K = int(input())
S = int(input())
if len(S) <= K:
  print(S)
else:
  print(S[:K]+"...")
Problem p02707 (python)

Fixed submission:

n = int(input())
a = list(map(int, input().split()))
submap = {}
for each in a:
  try:
    submap[each] += 1
  except:
    submap[each] = 1
for i in range(1, n+1):
  try:
    print(submap[i])
  except:
    print(0)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
submap = {}
for each in a:
  try:
    submap[i] += 1
  except:
    submap[i] = 1
for i in range(1, n+1):
  try:
    print(submap[i])
  except:
    print(0)
Problem p02790 (python)

Fixed submission:
ab = input().split(' ')
print(min(ab[0]*int(ab[1]), ab[1]*int(ab[0])))

Buggy submission (verdict: Runtime Error):
import sys
ab = sys.stdin.readline().split(' ')
print(max(ab[0]*int(ab[1]), ab[1]*int(ab[0]))

Buggy submission (verdict: Runtime Error):
ab = input().split(' ')
print(max(ab[0]*int(ab[1]), ab[1]*int(ab[0]))
Problem p02829 (python)

Fixed submission:
A = input()
B = input()
if A == "1"or B=="1":
	if A == "2"or B=="2":
		print("3")
	elif A == "3"or B=="3":
		print("2")
elif A == "2"or B=="2":
	if A == "3"or B=="3":
		print("1")

Buggy submission (verdict: Runtime Error):
A = input()
B = input()
if A = "1"or B="1":
	if A = "2"or B="2":
		print("3")
	elif A = "3"or B="3":
		print("2")
elif A = "2"or B="2":
	if A = "3"or B="3":
		print("1")
Problem p02859 (python)

Fixed submission:
r = int(input())

print(r*r)

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

return int(r*r)
Problem p02860 (python)

Fixed submission:
N = int(input())
S = input()
l = len(S)
flg = 0
if l%2 == 1:
	flg = 1
	print("No")
else:
	for i in range(int(l/2)):
		if S[i] != S[i+int(l/2)]:	
			print("No")
			flg = 1
			break
if flg == 0:
	print("Yes")

Buggy submission (verdict: Runtime Error):
N = int(input())
S = input()
l = len(S)
flg = 0
if l%2 == 1:
	flg = 1
	print("No")
else:
	for i in range(int(l/2)):
		//print(S[i],S[i+int(l/2)])
		if S[i] != S[i+int(l/2)]:	
			print("No")
			flg = 1
			break
if flg == 0:
	print("Yes")

Buggy submission (verdict: Runtime Error):
N = int(input())
S = input()
l = len(S)
flg = 0
if l%2 == 0:
	flg = 1
	print("No")
else:
	for i in range(l/2):
		if S[i] != S[i+l/2]:	
			print("No")
			flg = 1
            break
if flg == 0:
	print("Yes")
Problem p02873 (python)

Fixed submission:
S = input()
list = [100 for i in range(len(S))]
list.append(100)
cnt = 0
min = 0
if S[0] == "<":
	cnt = 1
	list[0] = 0
if S[-1] == ">":
	list[len(S)] = 0
for i in range(len(S)-1):
	if S[i] == ">" and S[i+1] == "<":
		list[i+1] = 0
		cnt = 1
for i in range(len(S)):
	if S[i] == "<":
		if list[i] == 0:
			cnt = 1
		list[i+1] = cnt
		cnt += 1
#print("lsit",list)

for i in range(len(S)-1):
	if S[len(S) - i - 1] == ">" and S[len(S) - i - 2] == "<":
		list[len(S) - i-1] = max(list[len(S) - i-1],list[len(S) - i]+1)
	elif S[len(S) - i - 1] == ">":
		list[len(S) - i-1] = list[len(S) - i]+1		
if S[0] == ">":
	list[0] = list[1] + 1
#print(list)
print(sum(list))

Buggy submission (verdict: Runtime Error):
S = input()
list = [100 for i in range(len(S))]
list.append(100)
cnt = 0
min = 0
if S[0] == "<":
	cnt = 1
	list[0] = 0
if S[-1] == ">":
	list[len(S)] = 0
print(S)
print(list)
for i in range(len(S)):
	if S[i] == ">" and S[i+1] == "<":
		list[i+1] = 0
		cnt = 1
	if S[i] == "<":
		list[i+1] = cnt
		cnt += 1
print("lsit",list)

for i in range(len(S)-1):
	if S[len(S) - i - 1] == ">" and S[len(S) - i - 2] == "<":
		list[len(S) - i-1] = max(list[len(S) - i-1],list[len(S) - i]+1)
	elif S[len(S) - i - 1] == ">":
		list[len(S) - i-1] = list[len(S) - i]+1		
print(list)
print(sum(list))
Problem p02879 (python)

Fixed submission:
s = input().split()
output = -1
s0 = int(s[0]) 
s1 = int(s[1]) 
if (0 < s0 and s0 < 10 and 0 < s1 and s1 < 10):
  output = s0*s1
  
print(output);

Buggy submission (verdict: Runtime Error):
s = input().split()
output = -1
if (0 < s[0] and s[0] < 10 and 0 < s[1] and s[1] < 10):
  output = s[0]*s[1]
  
return output;
Problem p02897 (python)

Fixed submission:
n = int(input())

if n%2 == 0:
	print(format(0.5, '.10f'))
else:
	print(format((n//2  + 1)/ n, '.10f'))

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

if n%2 == 0:
	print(float(1))
else:
	print(double((n//2  + 1)/ n))

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

if n%2 == 0:
	print(float(1))
else:
	print(float((n//2  + 1)/ n)
Problem p03135 (python)

Fixed submission:
x,t =map(int,input().split())
print(x/t)

Buggy submission (verdict: Runtime Error):
x,t =map(int,input())
print('{:.10f}'.format(x/t))

Buggy submission (verdict: Runtime Error):
x,t =map(int,input())
print(float(x/t))
Problem p03242 (python)

Fixed submission:
s = input()
a=''
for i in range(len(s)):
  if s[i]=='9':
    a += '1'
  elif s[i]=='1':
    a += '9'
  else:
    a += s[i]
print(a)

Buggy submission (verdict: Runtime Error):
a =list(input())
aa=''
for i in range(a):
  if a[i]=='9':
    aa +='1'
  elif a[i]=='1':
    aa +='9'
print(aa)

Buggy submission (verdict: Runtime Error):
a =input()
aa=''
for i in range(a):
  if a[i]=='9':
    aa +='1'
  elif a[i]=='1':
    aa +='9'
print(aa)

Buggy submission (verdict: Runtime Error):
a =input()
aa =a.replace(('9','1'),('1','9'))
print(aa)
Problem p03631 (python)

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

Buggy submission (verdict: Runtime Error):
a=input()
if a[0]==c[2]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a=int(input())
if a[0]==c[2]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a=int(input().split())
if a[0]==c[2]:
  print("Yes")
else:
  print("No")

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

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

Buggy submission (verdict: Runtime Error):
a = list(int,input().split())
if a[0]=a[-1]:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
a = list(int.input().split())
if a[0]=a[-1]:
  print("YES")
else:
  print("NO")

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

Buggy submission (verdict: Runtime Error):
a = int(input().split())
if a[0]=a[-1]:
  print("YES")
else:
  print("NO")
Problem p03803 (python)

Fixed submission:
a,b=map(int,input().split())
if a==b:
  print('Draw')
elif a==1:
  print('Alice')
elif b==1:
  print('Bob')
elif a > b:
  print('Alice')
else:
  print('Bob')

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a==b:
  print('Draw')
elif a==1
  print('Alice')
elif b==1
  print('Bob')
elif a > b:
  print('Alice')
else:
  print('Bob')

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a==b:
  print('Draw')
elif a==1
  print('Alice')
elif b==1
  print('Bob')
elif a>b:print('Alice')
elif a<b:print('Bob')

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a=b:
  print('Draw')
elif a=1 or a>b:
  print('Alice')
elif b=1 or a<b:
  print('Bob')

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a=b:
  print('Draw')
elif a=1:
  print('Alice')
elif b=1:
  print('Bob')
elif a>b:
  print('Alice')
else:
  print('Bob')

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a>b:
  print('Alice')
if a=b:
  print('Draw')
else:
  print('Bob')
Problem p03834 (python)

Fixed submission:
s =input().replace(","," ")
print(s)

Buggy submission (verdict: Runtime Error):
s =input().split(',')
a =s.split()
print(a)

Buggy submission (verdict: Runtime Error):
s =input()
a =s.split('')
print(a)
Problem p02682 (python)

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

if i [0] >= i[3]:
	saidai=1*i[3]
else:
	saidai=1*i[0]-1*(i[3]-i[0]-i[1])
print (saidai)

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

if i[0] <= i[3]:
	saidai=1*i[0]
elif:
	saidai=1*i[3]
else:
if i[2] >= (i[3]-i[0]-i[1]):
	saidai=saidai-1*(i[3]-i[0]-i[1])

print (saidai)
Problem p02699 (python)

Fixed submission:
line = input().split()
s=int(line[0])
w=int(line[1])
if s<=w:
  print("unsafe")
else:
  print("safe")

Buggy submission (verdict: Runtime Error):
line = input().split()
a=int(line[0])
b=int(line[1])
c=int(line[2])
d=int(line[3])
e=c//b
f=a//d
if e>=f:
  g=e
else:
  g=f
h=int(c)
j=int(a)
for i in range(ｇ):
	h=h-b
	j=j-d
	if h <= 0:
		print("Yes")
	elif j <= 0:
		print("No")
Problem p02757 (python)

Fixed submission:
#!/usr/bin/python3

(n, p) = map(int, input().split())
s = input()

c = 0
if p == 2 or p == 5:
    for i in range(n - 1, -1, -1):
        if int(s[i]) % p == 0:
            c += i + 1

else:
    mm = {}
    r = 0
    mten = 1
    for i in range(n - 1, -1, -1):
        ch = int(s[i])
        r = (r + ch * mten) % p
        mten = (mten * 10) % p
        if r in mm:
            c += mm[r]
            mm[r] += 1
        else:
            mm[r] = 1

        if r == 0:
            c += 1
        
print(c)

Buggy submission (verdict: Runtime Error):
#!/usr/bin/python3

(n, p) = map(int, input().split())
s = input()

c = 0
if p == 2 or p == 5:
    for i in range(n - 1, -1, -1):
        if int(s[i]) % p == 0:
            c += i + 1

else:
    mm = {}
    for i in range(n - 1, -1, -1):
        u = int(s[i:])
        r = u % p
        if r in mm:
            c += l
            mm[r] += 1
        else:
            mm[r] = 1

        if r == 0:
            c += 1
        
print(c)
Problem p02785 (python)

Fixed submission:
input_line = list(map(int,input().split()))
input_hp = list(map(int,input().split()))

if input_line[0] <= input_line[1]:
    print('0')
else:
    input_hp.sort()
    result_input_hp = len(input_hp) - input_line[1]
    sum_total = sum(input_hp[:result_input_hp])
    print(sum_total)

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
input_line = list(map(int,input().split()))
input_hp = list(map(int,input().split()))

input_hp.sort(reverse=True)
try:
    [input_hp.pop(_) for _ in range(input_line[1])]
    print(sum(input_hp))
except IndexError:
    print(‘0’)

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
input_line = list(map(int,input().split()))
input_hp = list(map(int,input().split()))
try:
    [(input_hp.sort(reverse=True) ,input_hp.pop(_)) for _ in range(input_line[1])]
    print(sum(input_hp))
except IndexError:
    print(‘0’)

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

input_hp = list(map(int,input().split()))

input_hp.sort(reverse=True)

tec_count = input_line[1]

if input_line[0] <= input_line[1]:
    print('0')
else:
    for i in range(tec_count):
        input_hp.pop(i)
    result = sum(input_hp)
    print(result)
Problem p02693 (python)

Fixed submission:
K = int(input(""))
A, B = map(int, input().split())
number = False
for i in range(A, B+1):
    if i % K == 0:
        number = True

print("OK" if number else "NG")

Buggy submission (verdict: Runtime Error):
K = input("")
A, B = map(int, input().split())
number = False
for i in range(A, B+1):
    if number % K == 0:
        number = True
        
print("OK" if number else "NG")
Problem p02835 (python)

Fixed submission:
input = input().split()

a = int(input[0])
b = int(input[1])
c = int(input[2])

if (a + b + c < 22): print("win")
else: print("bust")

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

a = int(input[0])
b = int(input[1])
c = int(input[2])

if (a+b+c < 22): print("bust")
else: print("win")

Buggy submission (verdict: Runtime Error):
a,b,c = int(input().split(" "))
if (a+b+c < 22): print("bust")
else: print("win")
Problem p02836 (python)

Fixed submission:
str = input()
count = 0

for i in range(len(str)):
  if str[i] != str[len(str)-1-i]:
    count += 1
    
print(int(count/2))

Buggy submission (verdict: Runtime Error):
str = input
count = 0

for i in range(len(str)):
  if str[i] != str[len(str)-1-1]:
    count += 1
    
print(count/2)
Problem p02676 (python)

Fixed submission:
k=int(input())
s=input()
l=len(s)
if(l<=k):
  print(s)
else:
  s=s[:k]
  s=s+"..."
  print(s)

Buggy submission (verdict: Runtime Error):
k=int(input())
s=input()
l=len(s)
if(l<=k):
  print(s)
else:
  s=s[k:]
  print(s,end=" ",...)
Problem p02729 (python)

Fixed submission:
from operator import mul
from functools import reduce

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

n,m=map(int, input().split())
a = 0
b = 0
if n > 1:
  a = cmb(n, 2)  
if m > 1:
  b = cmb(m,2)
print(a+b)

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

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

n,m=map(int, input().split())
a = 0
b = 0
if n != 1:
  a = cmb(n, 2)  
if m != 1:
  b = cmb(m,2)
print(a+b)

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

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

n,m=map(int, input().split())
a = cmb(n, 2)
b = 0
if m != 1:
  b = cmb(m,2)
print(a+b)
Problem p02689 (python)

Fixed submission:
n,m=map(int, input().split())
h=list(map(int, input().split()))
root=[list(map(int,input().split()))  for _ in range(m)]

ans=0
lis=[1 for _ in range(n)]

for i in range(len(root)):
    a=root[i][0]
    b=root[i][1]
    if h[a-1] > h[b-1]:
        lis[b-1]=0
    elif h[a-1]< h[b-1]:
        lis[a-1]=0
    else:
        lis[a-1]=0
        lis[b-1]=0

ans=sum(lis)
print(ans)

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

ans=0
lis=[1 for _ in range(n)]

for i in range(len(root)):
    a=root[i][0]
    b=root[i][1]
    if h[a-1] > h[b-1]:
        lis[b-1]=0
    elif h[a-1]< h[b-1]:
        lis[a-1]=0
    else:
        lis[a-1],lis[b-1]=0

ans=sum(lis)
print(ans)
Problem p02711 (python)

Fixed submission:
def resolve():
    n=input()

    if  '7' in n:
        print('Yes')
    else:
        print('No')
if __name__ == "__main__":
    resolve()

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

    if  '7' in n:
        print('Yes')
    else:
        print('No')
Problem p02712 (python)

Fixed submission:
def resolve():
    n=int(input())
    ans=0

    for i in range(n+1):
        if i%3!=0 and i%5!=0:
            ans+=i
    print(ans)
if __name__ == "__main__":
    resolve()

Buggy submission (verdict: Runtime Error):
ef resolve():
    n=int(input())
    ans=0

    for i in range(n+1):
        if i%3!=0 and i%5!=0:
            ans+=i
    print(ans)
if __name__ == "__main__":
    resolve()