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

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

Buggy submission (verdict: Runtime Error):
from decimal import *
 
a = list(input().rstrip().split(" "))
 
A,B =Decimal(int(a[0])),float(a[1])
 
if A > 100:
    C = int(B*100)
    
    ans2 = (A-100)*C
    ans3 = int(ans2/100)
    ans = C + ans3
else:
    ans = int(A*B)
    
print(ans)

Buggy submission (verdict: Runtime Error):
from decimal import *

a = list(input().rstrip().split(" "))

A,B =Decimal(int(a[0])),float(a[1])

if A > 10**6:
    C = int(B*100)
    ans1 = int(100*B)
    ans2 = (A-100)*C
    ans3 = ans2/100
    ans = int(ans1 + ans3)
else:
    ans = int(A*B)
    
print(ans)

Buggy submission (verdict: Runtime Error):
from decimal import *

a = list(input().rstrip().split(" "))

A,B =Decimal(int(a[0])),float(a[1])

if A > 1**6:
    C = int(B*100)
    ans1 = int(100*B)
    ans2 = (A-100)*C
    ans3 = int(ans2/100)
    ans = ans1 + ans3
else:
    ans = int(A*B)
    
print(ans)
Problem p02707 (python)

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

mydict = {}
for i in range(N):
    mydict[i] = 0


for i in range(len(a)):
    if M-a[i] <= N:
        mydict[a[i]-1] += 1 
        N -= 1
        M -= a[i]

for i in range(W):
    print(mydict[i])

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


mydict = {}
for i in range(N):
    mydict = {i:0}


for i in range(N):
    if a[i] > N:
        mydict[a[i]] += 1 
        N -= 1

for i in range(1:N):
    print(mydict[a[i]])
Problem p02712 (python)

Fixed submission:
#coding: utf-8
 
N  = int(input())
sum = 0
 
for i in range(N+1):
    if ( i % 3 != 0):
        if (i % 5 != 0):
           sum += i
 
print(sum)

Buggy submission (verdict: Runtime Error):
coding: utf-8
 
N  = int(input())
sum = 0
 
for i in range(N):
    if ( i % 3 != 0):
        if (i % 5 != 0):
           sum += i
 
print(sum)

Buggy submission (verdict: Runtime Error):
oding: utf-8
 
N  = int(input())
sum = 0
 
for i in range(N):
    if ( i % 3 != 0):
        if (i % 5 != 0):
           sum += i
 
print(sum)

Buggy submission (verdict: Runtime Error):
# coding: utf-8
 
N  = int(input())
sum = 0
 
for i in range(N):
    if ( i % 3 != 0):
        if (i % 5! = 0):
           sum += i
 
print(sum)
Problem p02880 (python)

Fixed submission:
S = []
N = int(input())
 
for i in range(10):
    for j in range(10):
        S.append(i*j)
 
if N in S:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
S = []
N = int(input())

for i in range(10):
    for j in range(10):
        S.append(i*j)

if N in S:
    print("Yes")
else:
    print("No)
Problem p02629 (python)

Fixed submission:
n=int(input())
d='abcdefghijklmnopqrstuvwxyz'
x=n
s=''
n-=1
while(n>=0):
    s+=d[n%26]
    n=n//26
    n-=1
print(s[::-1])

Buggy submission (verdict: Runtime Error):
n=int(input())
d={1:'a',2:'b',3:'c',4:'d',5:'e',6:'f',7:'g',8:'h',9:'i',10:'j',11:'k',12:'l',13:'m',14:'n',15:'o',16:'p',
17:'q',18:'r',19:'s',20:'t',21:'u',22:'v',23:'w',24:'x',25:'y',26:'z'}

x=n
s=''

while(x%26!=0):
    if x//26!=0:
            f=x%26
            x=x//26
    else:break
    s+=d[f]
f=x%26
s+=d[f]
print(s[::-1])
Problem p02659 (python)

Fixed submission:
a,b=input().split()
a = int(a)
b = list(b.split("."))
b = ''.join(b)
b = int(b)
print(a*b//100)

Buggy submission (verdict: Runtime Error):
a,b=map(float,input().split())
a=int(a)
z=list(str(b-int(b)))
t=''
for i in range(4):
    t+=z[i]
t=float(t)
print(int(int(a*int(b))+int(t*a)))
Problem p02831 (python)

Fixed submission:
import fractions

str_list = input().split(' ')
int_list = [int(x) for x in str_list]
A, B = int_list[0], int_list[1]

print( (A*B)//fractions.gcd(A, B) )

Buggy submission (verdict: Runtime Error):
import math

str_list = input().split(' ')
int_list = [int(x) for x in str_list]
A, B = int_list[0], int_list[1]

print( (A*B)//math.gcd(A, B) )
Problem p02915 (python)

Fixed submission:
import numpy as np
N=int(input())
print(N**3)

Buggy submission (verdict: Runtime Error):
N=int(input())
return 2**N
Problem p02699 (python)

Fixed submission:
S,W = map(int, input().split())

if W>=S:
    print('unsafe')
else:
    print('safe')

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

pair = 0

if num < 5:
    print(0)
else:
    for i in range(5,num):
        for j in range(num-i+1):
            temp = int(S[j:j+i+1])
            if temp % 2019 == 0:
                pair += 1

    print(pair)
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):
N, X, Y = map(int, input().split(' '))

dct = {X : Y}
short = Y - X - 1

dist_list = [0] * N

for i in range(1,N):
    for j in range(i+1,N+1):
        d1 = abs(X - i) + 1 + abs(Y - j)
        d2 = j - i
        dist = min(d1,d2)
        dist_list[dist] += 1

for k in range(1,N):
    print(dist[k])
Problem p02726 (python)

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

dist_list = [0] * N

for i in range(1,N):
    for j in range(i+1,N+1):
        d1 = abs(X - i) + 1 + abs(Y - j)
        d2 = j - i
        dist = min(d1,d2)
        dist_list[dist] += 1

for k in range(1,N):
    print(dist_list[k])

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

dct = {X : Y}
short = Y - X - 1

dist_list = [0] * N

for i in range(1,N):
    for j in range(i+1,N+1):
        d1 = abs(X - i) + 1 + abs(Y - j)
        d2 = j - i
        dist = min(d1,d2)
        dist_list[dist] += 1

for k in range(1,N):
    print(dist[k])
Problem p02729 (python)

Fixed submission:
from math import factorial

N,M = map(int, input().split())

if N <= 1:
  a = 0
else:
  a = factorial(N) / 2 / factorial(N - 2)
  
if M <= 1:
  b = 0
else:
  b = factorial(M) / 2 / factorial(M - 2)
  
print(int(a+b))

Buggy submission (verdict: Runtime Error):
from collections import Counter
from math import factorial

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

for k in range(N):
  sum_k = 0
  temp_c = c.copy()
  temp_c[A[k]] -= 1
  for v in temp_c.values():
    if v > 1:
      sum_k += factorial(v) / 2 / factorial(v - 2)
  print(int(sum_k))
Problem p02693 (python)

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

dist = A % K + B - A

if dist >= K :
  print("OK")
elif A % K == 0 or B % K == 0:
  print("OK")
else :
  print("NG")

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

if N < B :
  print(int(N * A // B) - A * int(N // B))
  sys.exit()
else :
  print(((B-1) * A // B) - A * ((B-1) // B))
Problem p02831 (python)

Fixed submission:
from fractions import gcd
def lcm(x, y):
    return (x * y) // gcd(x, y)

s,t = map(int,input().split())
print(lcm(s,t))

Buggy submission (verdict: Runtime Error):
import math
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

s,t = map(int,input().split())
print(lcm(s,t))
Problem p02860 (python)

Fixed submission:
import sys
N = int(input())
S = str(input())

if N%2==1:
    print('No')
    sys.exit()

S_1 = S[:N//2]

S_2 = S_1+S_1
if S == S_2:
    print("Yes")
else:
    print("No")

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

if N%2==1:
    print('No')
    sys.exit()

S_1 = S[:N//2]

S_2 = S_1+S_1
if S == S_2:
    print("Yes")
else:
    print("No")

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

if N%2==0:
    N = int(N)
else:
    print('No')
    sys.exit()
S_1 = S[:N//2]

S_2 = S_1+S_1
if S == S_2:
    print("Yes")
else:
    print("No")
Problem p03017 (python)

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

def SINGLE_INT(): return int(INPUT())
def MULTIPLE_INT_LIST(): return list(map(int, INPUT().split()))
def MULTIPLE_INT_MAP(): return map(int, INPUT().split())
def SINGLE_STRING(): return INPUT()
def MULTIPLE_STRING(): return INPUT().split()

N, A, B , A_goal, B_goal = MULTIPLE_INT_MAP()
S = SINGLE_STRING()

def surpass():

    if '...' in S[B-2:B_goal+1]:
        return 'Yes'
    else:
        return 'No'


if '##' in S[A-1: A_goal+1] or '##' in S[B-1:B_goal+1]:
    print('No')

else:
    if A_goal < B_goal:
        print('Yes')
    else:
        print(surpass())

Buggy submission (verdict: Runtime Error):
import sys
INPUT = sys.stdin.readline
 
def SINGLE_INT(): 
    return int(INPUT())
def MULTIPLE_INT_LIST(): 
    return list(map(int, INPUT().split()))
def MULTIPLE_INT_MAP(): 
    return map(int, INPUT().split())
def SINGLE_STRING(): 
    return INPUT()
def MULTIPLE_STRING(): 
    return INPUT().split()

N, A, B , A_goal, B_goal = MULTIPLE_INT_MAP()
S = SINGLE_STRING()
 
def surpass():
    if '...' in S[B-2:B_goal+1]:
        return 'Yes'
	else:
        return 'No'
 
 
if '##' in S[A-1: A_goal+1] or '##' in S[B-1:B_goal+1]:
    print('No')

else:
    if A_goal < B_goal:
        print('Yes')
    else:
        print(surpass())
Problem p03315 (python)

Fixed submission:
S = input()
S = list(S)


S = [int(1) if x == '+' else int(-1) for x in S]

print(sum(S))

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

def SINGLE_INT(): return int(INPUT())
def MULTIPLE_INT_LIST(): return list(map(int, INPUT().split()))
def MULTIPLE_INT_MAP(): return map(int, INPUT().split())
def SINGLE_STRING(): return INPUT()
def MULTIPLE_STRING(): return INPUT().split()

N = SINGLE_INT()

def is_integer_num(n):
    if isinstance(n, int):
        return True
    if isinstance(n, float):
        return n.is_integer()
    return False

if is_integer_num(N/2):
    print(N)
else:
    print(N*2)

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

def SINGLE_INT(): return int(INPUT())
def MULTIPLE_INT_LIST(): return list(map(int, INPUT().split()))
def MULTIPLE_INT_MAP(): return map(int, INPUT().split())
def SINGLE_STRING(): return INPUT()
def MULTIPLE_STRING(): return INPUT().split()

N = SINGLE_INT()

def is_integer_num(n):
    if isinstance(n, int):
        return True
    if isinstance(n, float):
        return n.is_integer()
    return False

if is_integer_num(N/2):
    print(N)
else:
    print(N*2)
Problem p02689 (python)

Fixed submission:
import sys
import collections
import itertools
import numpy as np

n,m = map(int, input().split())
al = np.ones(n,dtype="int8")
H = list(map(int, input().split()))
AB=[]

for i in range(m):
    AB.append(tuple(map(int, input().split())))

for t in range(m):
    A = AB[t][0]
    B = AB[t][1]
	
    bou1 = H[A-1]
    bou2 = H[B-1]
    if bou1<bou2:
        al[A-1] = al[A-1]-1
    elif bou2<bou1:
        al[B-1] = al[B-1]-1
    else:
        al[A-1] = al[A-1]-1
        al[B-1] = al[B-1]-1
print(np.count_nonzero(al==1))

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

n,m = map(int, input().split())
al = np.ones(n,dtype="int8")
H = list(map(int, input().split()))
AB=[]

for i in range(m):
    AB.append(tuple(map(int, input().split())))

for t in range(m):
    A = AB[t][0]
    B = AB[t][1]

    bou1 = H[A-1]
    bou2 = H[B-1]
    if bou1<bou2:
        al[B-1] = al[B-1]-1
    elif bou2<bou1:
        al[A-1] = al[a-1]-1
    else:
        al[A-1] = al[a-1]-1
        al[B-1] = al[B-1]-1
print(np.count_nonzero(al>0))
Problem p02759 (python)

Fixed submission:
n=int(input())

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

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

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

Fixed submission:
s = input()
k = int(input())

prev = ""
count1 = 0
count2 = 0
count3 = 0
flag = 0
for i in s:
    if flag == 1:
        prev = i
        flag = 0
        continue
    if prev == i:
        count1 += 1
        flag = 1
    prev = i



for i in s:
    if flag == 1:
        prev = i
        flag = 0
        continue
    if prev == i:
        count2 += 1
        flag = 1
    prev = i

for i in s:
    if flag == 1:
        prev = i
        flag = 0
        continue
    if prev == i:
        count3 += 1
        flag = 1
    prev = i

if k % 2 == 1:
    ret = count1 + (k-1) // 2 * (count2 + count3)
else:
    ret = count1 + ((k-1)//2+1) * count2 + (k-1)//2 * count3

print(ret)

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

prev = ""
count = 0
flag = 0
for i in s:
    if flag == 1:
        prev = i
        flag = 0
        continue
    if prev == i:
        count += 1
        flag = 1
    prev = i

count2 = 0
if s[0] == s[-1] and s[-1] != s[-2]:
    count2 = 1
ret = count*k + count2*(k-1)

print(ret)
Problem p02897 (python)

Fixed submission:
if __name__ == "__main__":
    n = int(input())
    if n % 2 == 0:
        print(0.5)
    else:
        p = (n + 1) / (2 * n)
        print(p)

Buggy submission (verdict: Runtime Error):
if __name__ == "__main__":
  n = input()
  if n % 2 == 0:
    print(0.5)
  else:
    p = (n+1)/(2*n)
    print(p)
Problem p02594 (python)

Fixed submission:
x = int(input())
if x >= 30:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
x = int(input())
if x => 30:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
X = int(input())
if x >= 30:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
X = int(input())
if x => 30:
  print("Yes")
else:
  print("No")
Problem p02596 (python)

Fixed submission:
K = int(input())

if K % 2 == 0 or K % 5 == 0:
    print(-1)
    exit()

i = 0
ai = 0
while True:
    ai = (ai * 10 + 7) % K
    i += 1
    if ai == 0:
        break
print(i)

Buggy submission (verdict: Runtime Error):
k = int(input())
t = 7
kou = 1

if k % 2 != 0:
  if k % 5 != 0:
    while True:
      kou += 1
      t = 10 * t + 7
    
    if t % k == 0:
    print(kou)
    break

print(-1)
Problem p02701 (python)

Fixed submission:
n = int(input())
lis = set()
for i in range(n):
  i = str(input())
  lis.add(i)
  
kind = int(len(lis))
print(kind)

Buggy submission (verdict: Runtime Error):
n = int(input())
lis = set()
for i in range(n):
  i = str(input())
  ilen = len(i)
  lis.append(ilen)
  
kind = int(len(lis))
print(kind)

Buggy submission (verdict: Runtime Error):
n = int(input())
lis = {}
for i in range(n):
  i = str(input())
  ilen = len(i)
  lis.append(ilen)
  
kind = int(len(lis))
print(kind)
Problem p02723 (python)

Fixed submission:
s = input()
if s[-1] == s[-2]:
  if s[-3] == s[-4]:
    print("Yes")
    exit()

print("No")

Buggy submission (verdict: Runtime Error):
k, n = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
b = []
c = abs(k+a[0]-a[n-1])
for i in range(1, n):
  b.append(abs(a[i] - a[i-1]))
  b.sort()
  p = b[-1]

if p > c:
  print(k - p)
else:
  print(k - c)
Problem p02729 (python)

Fixed submission:
n, m = map(int, input().split())
if m >= 2:
  if n < 2:
    print(int(m*(m-1)/2))
    quit()
  else:
    print(int(m*(m-1)/2 + n*(n-1)/2))
    quit()
    
if m < 2:
  if n < 2:
    print(0)
  else:
    print(int(n*(n-1)/2))

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
if m >= 2:
  if n < 2:
    print(int(m*(m-1)/2)
    quit()
  else:
    print(int(m*(m-1)/2 + n*(n-1)/2))
    quit()
    
if m < 2:
  if n < 2:
    print(0)
  else:
    print(int(n*(n-1)/2))
Problem p02777 (python)

Fixed submission:
S,T = input().split()
A,B = map(int,input().split())
U = input()

if S==U:
    A-=1
else:
    B-=1

print(A,B)

Buggy submission (verdict: Runtime Error):
N,K = list(map(int, input().split()))
p = list(map(int, input().split()))
p2 = [p[i]*0.5 + 0.5 for i in range(N)]
size = N + 1
cusum = [0] * size
max = 0

for i in range(N):
    cusum[i+1] = cusum[i] + p2[i]

for i in range(N-K+1):
    tmp = cusum[i+K] - cusum[i]
    if max < tmp:
        max = tmp
print(max)
Problem p02595 (python)

Fixed submission:
import math
n,d = map(int,input().split())
xy = [list(map(int,input().split())) for _ in range(n)]
cnt = 0
for i in range(n):
	if math.sqrt((xy[i][0])**2 + (xy[i][1])**2) <= d:
		cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
import math
n,d = map(int,input().split())
xy = [list(map(int,input().split())) for _ in range(n)]
cnt = 0
for i in range(n):
	if math.sqrt((xy[0])**2 + (xy[1])**2) <= d:
		cnt += 1
print(cnt)
Problem p02659 (python)

Fixed submission:
import math
from decimal import *
a,b = map(float,input().split())
ans = Decimal(str(b))*int(a)
print(math.floor(ans))

Buggy submission (verdict: Runtime Error):
A,B = input().split()
A = int(A) 
B = float(B)
B = "{:.2f}".format(B)
#print(int(A*B))
print(int(A*B))
Problem p02712 (python)

Fixed submission:
N = int(input())
seq = [i for i in range(1,N+1)]
count = 0
for t in range(0,N):
	if seq[t]%3 != 0 and seq[t]%5 != 0:
		count += seq[t]
print(count)

Buggy submission (verdict: Runtime Error):
N = int(input())
seq = [i for in range(1,N) 
count = 0
for t in range(len(seq)):
  if seq[t]%3 != 0 or seq[t]%5 != 0:
       count += seq[t]
print(count)
Problem p02725 (python)

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

Buggy submission (verdict: Runtime Error):
k,n = map(int,input().split())
a = list(map(int,input().split()))
for i in range(n):
  if a[i] >= k/2
    a[i] = a[i] -k
print(max(a)-min(a))
Problem p02785 (python)

Fixed submission:
n,k = map(int,input().split())
h = list(map(int,input().split()))
h.sort(reverse = True)
if k > n:
	k = n
for i in range(k):
	h[i] = 0
print(sum(h))

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
h = list(map(int,input().split()))
h.sort(reverse = True)
for i in range(k):
	h[i] = 0
print(sum(h))
Problem p02829 (python)

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

ans = 6 - (A+B)
print(ans)

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

ans = 6 - (A+B)
print(ans)
Problem p02831 (python)

Fixed submission:
import fractions
A,B = map(int,input().split())
print((A*B)//fractions.gcd(A,B))

Buggy submission (verdict: Runtime Error):
import math
A,B = map(int,input().split())
print(int((A*B)/math.gcd(A,B)))

Buggy submission (verdict: Runtime Error):
import math
A,B = map(int,input().split())
ans = (A*B)//(math.gcd(A,B))
print(ans)

Buggy submission (verdict: Runtime Error):
import math
A,B = map(int,input().split())
print((A*B) // math.gcd(A,B))

Buggy submission (verdict: Runtime Error):
import math
A,B = map(int,input().split())
print((A*B)//math.gcd(A,B))
Problem p02836 (python)

Fixed submission:
S = input()
S = list(S)
N = len(S)
count = 0

for i in range(N//2):
	if S[i] != S[(N-1)-i]:
		S[i] = S[(N-1)-i]
		count += 1

print(count)

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

for i in range(len(S)//2):
  if S[i] != S[N-i]:
    S[i] = S[N-i]
    count += 1

print(count)
Problem p02847 (python)

Fixed submission:
day = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
S = 7 - day.index(input())
print(S)

Buggy submission (verdict: Runtime Error):
day = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
S = 7 - index(input())
print(day[S])
Problem p02860 (python)

Fixed submission:
N = int(input())
S = input()
if S[:(N//2)] == S[(N//2):]:
	print("Yes")
else:
	print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
S = input()
if N == 1:
  print("No")
if S[:(N//2) == S[(N//2+1):]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
S = input()
if S[:(N//2) == S[(N//2+1):]:
     print("Yes")
else:
     print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
S = list(input())
if S[:(N//2) == S[(N//2+1):]:
     print("Yes")
else:
     print("No")
Problem p02879 (python)

Fixed submission:
A,B = map(int,input().split())
print(A*B if A<= 9 and B <=9 else "-1")

Buggy submission (verdict: Runtime Error):
A,B = int(input())
print(A*B if A<= 9 and B <=9 else -1)
Problem p02880 (python)

Fixed submission:
n = int(input())
bol = 0
for i in range(1,10):
  for j in range(1,10):
    if i*j == n:
      bol = 1
      break
if bol == 1:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
bol = 0
for i in range(1,10):
  for j in range(1:10):
    if i*j == n:
      bol = 1
      break
if bol == 1:
  print("Yes")
else:
  print("No")
Problem p02915 (python)

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

Buggy submission (verdict: Runtime Error):
N = int(input())
count = 1
for i in range(N):
  if N = 0:
    print(count)
  else:
  	count *= N
  	N = N -1
Problem p02970 (python)

Fixed submission:
import math
N,D = map(int,input().split())
print(math.ceil(N/((D*2+1))))

Buggy submission (verdict: Runtime Error):
import math
N,D = map(int,input().split())
print(math.ceil(N/(D**2+1))
Problem p03012 (python)

Fixed submission:
N = int(input())
W = list(map(int,input().split()))
W.insert(N,0)
left,right = 0,0
S = 1000
for i in range(0,N):
	left += W[i]
	right = sum(W) - left
	S =min(S,abs(left - right))
print(S)

Buggy submission (verdict: Runtime Error):
N = int(input())
W = list(map(int,input().split()))
S = 1000
for i in range(1,N):
  S = min(S,abs(sum(range(W[1],[i]))-sum(range(i+1,N))))
print(S)
Problem p03041 (python)

Fixed submission:
n,k = map(int,input().split())
s = list(input())
s[k-1] = s[k-1].lower()
print("".join(s)) #"".join()にてリストを文字列に変換できる

Buggy submission (verdict: Runtime Error):
n,k = int(input().split())
s = list(input())
s[k-1] = s[k-1].lower()
print(str(s))
Problem p02682 (python)

Fixed submission:
import math
ans = False
a, b, c, k = map(int, input().split())
ans += min(k, a)
k -= min(k, a)
k -= min(k, b)
ans -= min(k, c)
print(ans)

Buggy submission (verdict: Runtime Error):
import math
ans = False
a, b, c, k = map(int, input().split()
ans += min(k, a)
k -= min(k, a)
k -= min(k, b)
ans -= min(k, c)
print(ans)
Problem p02688 (python)

Fixed submission:
N, K = map(int, input().split())
l1 = [0]*N
for _ in range(K):
    d = int(input()) 
    l2= list(map(int, input().split()))
    for val in l2:
        l1[val-1] = 1
print(N-sum(l1))

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
list = [0]*N
for _ in range(K):
    d = int(input()) 
    l2= list(map(int, input().split()))
    print(l2)
    for val in l2:
        list[val-1] = 1
print(N-sum(list))
Problem p02754 (python)

Fixed submission:
n,a,b = map(int,input().split())
x = n//(a+b)
if n - x*(a+b) > a:
    Y =a
else:
    Y=n - x*(a+b)
print(a*x+Y)

Buggy submission (verdict: Runtime Error):
n, a, b = map(int, input().split())
x="b"*a+"r"*b
x= x*(10**5)
strx = x[0:n]
def split(w):
    return [all for all in w]
def countX(lst, x): 
    return lst.count(x) 
listx = split(strx)
print(countX(listx, "b"))

Buggy submission (verdict: Runtime Error):
n, a, b = map(int, input().split())
x="b"*a+"r"*b
x= x*(10**5)
strx = x[0:n]
def split(w):
    return [all for all in w]
def countX(lst, x): 
    return lst.count(x) 
listx = split(strx)
print(countX(listx))

Buggy submission (verdict: Runtime Error):
n, a, b = map(int, input().split())
x="b"*a+"r"*b
x= x*(10**100)
strx = x[0:n]
def split(w):
    return [all for all in w]
def countX(lst, x): 
    return lst.count(x) 
listx = split(strx)
print(countX(listx))
Problem p02759 (python)

Fixed submission:
n= int(input())
if n%2==0:
  print(int(n*0.5))
else:
  print(int(0.5*n)+1)

Buggy submission (verdict: Runtime Error):
n= int(input)
if n%2==0:
  print(int(n*0.5))
else:
  print(int(0.5*n)+1)
Problem p02771 (python)

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

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