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

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

i=0
j=-1
k=-1
c=0

while(True):
    if(c==0):
        if(i>=(len(A))):
            print("A")
            exit()
        if(A[i]=="a"):
            i+=1
            c=0
        elif(A[i]=="b"):
            j+=1
            c=1
        else:
            k+=1
            c=2

    elif(c==1):
        if(j>=(len(B))):
            print("B")
            exit()
        if(B[j]=="a"):
            i+=1
            c=0
        elif(B[j]=="b"):
            j+=1
            c=1
        else:
            k+=1
            c=2
    else:
        if(k>=(len(C))):
            print("C")
            exit()
        if(C[k]=="a"):
            i+=1
            c=0
        elif(C[k]=="b"):
            j+=1
            c=1
        else:
            k+=1
            c=2

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

i=0
j=0
k=0
c=0

while(True):
    if(c==0):
        if(i>=(len(A)+1)):
            print("A")
            exit()
        if(A[i]=="a"):
            i+=1
            c=0
        elif(A[i]=="b"):
            j+=1
            c=1
        else:
            k+=1
            c=2

    elif(c==1):
        if(j>=(len(B)+1)):
            print("B")
            exit()
        if(B[j]=="a"):
            i+=1
            c=0
        elif(B[j]=="b"):
            j+=1
            c=1
        else:
            k+=1
            c=2
    else:
        if(k>=(len(C)+1)):
            print("C")
            exit()
        if(C[k]=="a"):
            i+=1
            c=0
        elif(C[k]=="b"):
            j+=1
            c=1
        else:
            k+=1
            c=2
Problem p02909 (python)

Fixed submission:
S = input()

if S =='Sunny':
    print('Cloudy')
if S =='Cloudy':
    print('Rainy')
if S =='Rainy':
    print('Sunny')

Buggy submission (verdict: Runtime Error):
n,k,q = map(int, input().split())
a = [int(input()) for _ in range(q)]
p = [0]*n

if k>q:
    for i in range(n):
        print('Yes')
    exit()
else:
    for i in range(n):
        p[i]=a.count(i+1)
        if k+p[i]-q<=0:
            print('No')
        else:
            print('Yes')
Problem p02945 (python)

Fixed submission:
A,B = map(int, input().split())
print(max(A+B,A-B,A*B))

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
print(max(A+B,A-B,A*B))

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
print((max(A+B,A-B,A*B)))

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
print(str(max(A+B,A-B,A*B)))

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

a=A+B
b=A-B
c=A*B

if a>b and a>c:
    print(str(a))

elif b>c and b>a:
    print(str(b))

else:
    print(str(c))
Problem p03000 (python)

Fixed submission:
n, x = map(int, input().split())
l = list(map(int, input().split()))
L=0

for i in range(2,n+2):
    L += l[i-2]
    if i == n+1 and L<x:
        print(n+1)
        exit()

    if L > x:
        print(i-1)
        exit()
    if L == x:
        print(i)
        exit()

    else:
        continue

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

L=0
for i in range(n+1):
    L += l[i]
    if L > x:
        print(i+1)
        exit()
Problem p03076 (python)

Fixed submission:
L = [int(input()) for i in range(5)]
a =[0]*5
ans = sum(L)
for i in range(5):
    if L[i]%10>0:
        a.append(10-L[i]%10)
#print(a)
print(sum(L)+sum(a)-max(a))

Buggy submission (verdict: Runtime Error):
L = [int(input()) for i in range(5)]
a =[]
ans = sum(L)
for i in range(5):
    if L[i]%10>0:
        a.append(10-L[i]%10)
#print(a)
print(sum(L)+sum(a)-max(a))
Problem p03324 (python)

Fixed submission:
d,n = map(int, input().split())
if n <100:
    print(100**d*n)
else:
    print(100**d*101)

Buggy submission (verdict: Runtime Error):
d,n = map(int, input().split())
if n <100:
    print(100**d*k)
else:
    print(100**d*101)
Problem p03416 (python)

Fixed submission:
A,Z = map(str, input().split())
a=[str(x) for x in A]
z=[str(x) for x in Z]
aa =int(a[0]+a[1]+a[2])
aaa =int(a[0]+a[1]+a[2]+a[1]+a[0])
zz =int(z[0]+z[1]+z[2])
zzz =int(z[0]+z[1]+z[2]+z[1]+z[0])
gap = (zz-aa)+1
cnt = 0
if aaa<int(A):
    cnt-=1
if zzz>int(Z):
    cnt-=1
print(gap+cnt)

Buggy submission (verdict: Runtime Error):
A,Z = map(str, input().split())
a=[str(x) for x in A]
z=[str(x) for x in Z]
aa =int(a[0]+a[1]+a[2]+'0'+'0')
#print(aa)
zz =int(z[0]+z[1]+z[2]+'0'+'0')
#print(zz)
#gapa = (int(Z)-int(A))//100+1
gapb = (zz-aa)//100+1
cnt = 0
if aa<int(A):
    #print('A')
    cnt-=1
if zz>int(Z):
    #print('Z')
    cnt-=1
print(gapa)
print(gapb+cnt)
#print(cnt)
#print(gap+cnt)
Problem p03433 (python)

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

if N>=500 and N-500*int(N/500)<=A:
    print('Yes')
elif N<500 and A>=N:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
X = int(input())
A = int(input())

if 2*(N-A)%1000==0:
    print('Yes')
else:
    print('No')
Problem p03455 (python)

Fixed submission:
a,b=map(int,input().split())
if a*b%2==0:
    print('Even')
else:
    print('Odd')

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

for _ in range(N):
    t,x,y = map(int,input().split())
    if x + y > t or (t -x -y) % 2:
        print('No')
        exit() 
print('Yes')

Buggy submission (verdict: Runtime Error):
N=int(input())
for _ in range(N):
    t,x,y = map(int,input().split())
    if x+y>t or (t-x-y)%2:
        print('No')
        exit() 
print('Yes')

Buggy submission (verdict: Runtime Error):
N=int(input())
for i in range(N):
    t,x,y = map(int,input().split())
    if x+y>t or (x+y-t)%2:
        print('No')
        exit() 
print('Yes')
Problem p03477 (python)

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

if a+b>c+d:
    print('Left')
elif a+b<c+d:
    print('Right')
else:
    print('Balanced')

Buggy submission (verdict: Runtime Error):
n, a, b = map(int, input().split())
ans = 0
for i in range(1, n+1):
    if a <= sum(map(int, str(i))) <= b:
        ans += i
print(ans)

Buggy submission (verdict: Runtime Error):
n, a, b = map(int, input().split())
ans = 0
for i in range(1, n+1):
    if a <= sum(map(int, str(i))) <= b:
        ans += i
print(ans)

Buggy submission (verdict: Runtime Error):
n, a, b = map(int, input().split())
ans = 0
for i in range(1, n+1):
    if a <= sum(map(int, str(i))) <= b:
        ans += i
print(ans)
Problem p03544 (python)

Fixed submission:
n = int(input())
l=[0]*100
l[0]=2
l[1]=1
def ryuka(x):
    r = 0
    for i in range(2,x+1):
        l[i]=l[i-1]+l[i-2]
    return l[i]
if n==1:
    print(1)
    exit()
else:
    print(ryuka(n))

Buggy submission (verdict: Runtime Error):
n = int(input())
l=[0]*100
l[0]=2
l[1]=1
def ryuka(x):
    r = 0
    for i in range(2,x+1):
        l[i]=l[i-1]+l[i-2]
    return l[i]
print(ryuka(n))
Problem p03657 (python)

Fixed submission:
a, b = map(int, input().split())
if a%3==0 or b%3==0 or (a+b)%3==0:
    print('Possible')
else:
    print('Impossible')

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
if a%3==0 or b%3==0 or (a+b)%==0:
    print('Possible')
else:
    print('Impossible')

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
if a%3==0 or b%3==0 of (a+b)%==0:
    print('Possible')
else:
    print('Impossible')

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
if a%3==0 or b%==0 of (a+b)%==0:
    print('Possible')
else:
    print('Impossible')
Problem p03050 (python)

Fixed submission:
import numpy as np

N = int(input())

ans = 0
for i in range(1, int(np.sqrt(N)) + 1):
    if N % i != 0:
        continue
    m = N//i - 1
    if m <= i:
        continue
    if N % m == 0:
        continue
    ans += m
print(ans)

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

N = int(input())

ans = 0
for i in range(1, int(np.sqrt(N)) + 1):
    if N % i != 0:
        continue
    m = N//i - 1
    if m <= i:
        continue
    if N % m == 0:
        continue
    ans += m
print(ans)
Problem p03071 (python)

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

if (A - B) >= 2:
    print(A + A - 1)
elif (B - A) >= 2:
    print(B + B - 1)
else:
    print(A + B)

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

if (a - b) >= 2:
    print(a + a - 1)
elif (b - a) >= 2:
    print(b + b - 1)
else:
    print(a + b)

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

if a >= (b - 2):
    print(a + a - 1)
elif b >= (a - 2):
    print(b + b - 1)
else:
    print(a + b)
Problem p03449 (python)

Fixed submission:
N = int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
ans = 0
for j in range(N):
    temp = 0
    for k in range(j+1):
        temp += A[k]
    for l in range(j,N):
        temp += B[l]
    ans = max(ans,temp)
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
A=list(map(int,input().split())
B=list(map(int,input().split())
ans = 0
for j in range(N):
    temp = 0
    for k in range(j+1):
        temp += A[k]
    for l in range(j,N):
        temp += B[l]
    ans = max(ans,temp)
print(ans)
Problem p03493 (python)

Fixed submission:
print(input().count("1"))

Buggy submission (verdict: Runtime Error):
n = int(input())
l = list(map(int,input().split()))
 
count = 0
 
while True:
  for i in range(n):
    if l[i]%2 == 0:
      l[i] = l[i]//2
    else:
      print(count)
      exit()
  count += 1

Buggy submission (verdict: Runtime Error):
n = int(input())
l = list(map(int,input().split()))
 
count = 0
 
while True:
  for i in n:
    if l[i]%2 == 0:
      l[i] = l[i]//2
    else:
      print(count)
      exit()
  count += 1

Buggy submission (verdict: Runtime Error):
n = int(input())
l = list(map(int ,input().split(" ")))
count = 0
while True:
  for i in range(n):
    if l[i]%2 == 0:
      l[i] = l[i]//2
    else:
      print(count)
      exit()
  count += 1

Buggy submission (verdict: Runtime Error):
n = int(input())
l = list(map(int ,input().split(" ")))
count = 0
while True:
	for i in range(n):
		if l[i]%2 == 0:
			l[i] = l[i]//2
		else:
			print(count)
			exit()
	count += 1

Buggy submission (verdict: Runtime Error):
n = input()
l = list(map(int ,input().split(" ")))
 
count = 0
 
while True:
	for i in range(n):
		if l[i]%2 == 0:
			l[i] = l[i]//2
		else:
			print(count)
			exit()
	count += 1

Buggy submission (verdict: Runtime Error):
n = int(input())
l=list(map(int ,input().split(" ")))
count=0
while True:
    for i in range(n):
        if l[i]%2==0:
            l[i]=l[i]//2
        else:
            print(count)
            exit()
    count+=1

Buggy submission (verdict: Runtime Error):
n = input()
l = list(map(int,input().split(" ")))
 
count = 0
 
while True:
  for i in range(n):
    if l[i]%2 == 0:
      l[i] = l[i]//2
    else:
      print(count)
      exit()
  count += 1

Buggy submission (verdict: Runtime Error):
n = input()
l = list(map(int,input().split(" ")))
 
count = 0
 
while True:
  for i in range(n):
    if l[i]%2 == 0:
      l[i] = l[i]//2
    else:
      print(count)
      break
  count += 1
Problem p03494 (python)

Fixed submission:
n = int(input())
l=list(map(int,input().split()))
count=0
while True:
    for i in range(n):
        if l[i]%2==0:
            l[i]=l[i]//2
        else:
            print(count)
            exit()
    count+=1

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

count = 0

while True:
  for i in n:
    if l[i]%2 == 0:
      l[i]//2
    else:
      print(count)
      exit()
  count += 1

Buggy submission (verdict: Runtime Error):
n = input()
l = list(map(int ,input().split(" ")))
 
count = 0
 
while True:
	for i in range(n):
		if l[i]%2 == 0:
			l[i] = l[i]//2
		else:
			print(count)
			exit()
	count += 1

Buggy submission (verdict: Runtime Error):
n = input()
l = list(map(int ,input().split(" ")))
 
count = 0
 
while True:
  for i in range(n):
    if l[i]%2 == 0:
      l[i] = l[i]//2
    else:
      print(count)
      exit()
  count += 1

Buggy submission (verdict: Runtime Error):
n = input()
l = list(map(int,input().split(" ")))
 
count = 0
 
while True:
  for i in range(n):
    if l[i]%2 == 0:
      l[i] = l[i]//2
    else:
      print(count)
      exit()
  count += 1

Buggy submission (verdict: Runtime Error):
n = input()
l = list(map(int,input().split(" ")))
 
count = 0
 
while True:
  for i in range(n):
    if l[i]%2 == 0:
      l[i] = l[i]//2
    else:
      print(count)
      break
  count += 1

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

count = 0

while True:
  for i in range(n):
    if l[i]%2 == 0:
      l[i]//2
    else:
      print(count)
      break
  count += 1
Problem p03495 (python)

Fixed submission:
n, k = map(int, input().split())
A = list(map(int,input().split()))
 
b = [0]*200002
 
for a in A:
  b[a] += 1
b.sort(reverse = True)
print(n-sum(b[:k]))

Buggy submission (verdict: Runtime Error):
N, K = map(int,input().split())
A = list(map(int,input().split()))
ans = 0
B = [0]*20

for i in A:
    B[i] += 1
B.sort(reverse = True)

for i in range(K,N):
    ans += B[i]
print(ans)

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

b = [0]*200002

for a in A:
  b[a] += 1
b.sort(reverse = Ture)
print(n-sum(b[:k]))
Problem p03693 (python)

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

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

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

Fixed submission:
N = int(input())
print(((N-1)*N)//2)

Buggy submission (verdict: Runtime Error):
N = int(input())
print(sum(list(range(N))))
Problem p02973 (python)

Fixed submission:
import bisect
from collections import deque
N = int(input())
A = [int(input()) for n in range(N)]

tree = deque([[A[0]]])
leaf = deque([A[0]])
for n in range(1,N):
    a = A[n]
    pos = min(n-1,bisect.bisect_left(leaf,a)-1)
    if pos==-1:
        tree.appendleft([a])
        leaf.appendleft(a)
    else:
        tree[pos].append(a)
        leaf[pos] = a
print(len(tree))

Buggy submission (verdict: Runtime Error):
import bisect
N = int(input())
A = [int(input()) for n in range(N)]

tree = [[A[0]]]
leaf = [A[0]]
for n in range(1,N):
    a = A[n]
    pos = min(n-1,bisect.bisect_left(leaf,a)-1)
    if pos==-1:
        tree = [a] + tree
        leaf = [a] + leaf
    else:
        tree[pos].append(a)
        leaf[pos] = a
print(len(tree))

Buggy submission (verdict: Runtime Error):
import bisect
N = int(input())
A = [int(input()) for n in range(N)]

tree = [[A[0]]]
leaf = [A[0]]
for n in range(1,N):
    a = A[n]
    pos = min(n-1,bisect.bisect_left(leaf,a)-1)
    if pos==-1:
        tree = a + tree
        leaf = a + leaf
    else:
        tree[pos].append(a)
        leaf[pos] = a
print(len(tree))
Problem p03001 (python)

Fixed submission:
W, H, x, y = map(int, input().split())

if x==W/2 and y==H/2:
    print(H*W/2, 1)
else:
    print(H*W/2, 0)

Buggy submission (verdict: Runtime Error):
W, H, x, y = map(int, input().split())

if (x == 0 or x == W) or (y == 0 and y == H) or x * H == W * y or x * H + W * y = W * H:
    print(W*H/2, 0)
else:
    S = W*min(y,H-y)
    T = min(x,W-x)*H
    counter = 0
    if S == T:
        counter += 1
    print(max(S,T), counter)
Problem p03032 (python)

Fixed submission:
N, K = map(int, input().split())
V = list(map(int, input().split()))
value = 0

for cd in range(K):
    ab = min(N, K-cd)
    for left_ab in range(ab+1):
        right_ab = ab - left_ab
        if right_ab > 0:
            pick = V[:left_ab] + V[-right_ab:]
        else:
            pick = V[:left_ab]
        pick.sort()
        neg = 0
        while neg < len(pick):
            if pick[neg]<0:
                neg+=1
                continue
            else:
                break
        v = sum(pick[min(neg,cd):])
        value = max(value,v)
        
print(value)

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

value = 0

for cd in range(K):
    ab = min(N, K-cd)
    for left_ab in range(ab+1):
        right_ab = ab - left_ab
        pick = V[:left_ab] + V[-right_ab:]
        pick.sort()
        neg = 0
        while True:
            if pick[neg]<0:
                neg+=1
                continue
            else:
                break
        v = sum(pick[min(neg,K):])
        value = max(value,v)
        
print(value)
Problem p03061 (python)

Fixed submission:
def gcd(a,b):
    if b == 0:
        return a
    else:
        return gcd(b, a%b)

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

L = [0]
R = [0]
for n in range(N-1):
    L.append(gcd(L[-1],A[n]))
    R.append(gcd(R[-1],A[N-n-1]))
    
GCDs = []
for n in range(N):
    GCDs.append(gcd(L[n], R[N-n-1]))
    
print(max(GCDs))

Buggy submission (verdict: Runtime Error):
def gcd(a,b):
    if b == 0:
        return a
    elif a%b == 0:
        return b
    else:
        return gcd(b,a%b)

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

L = [0]*N
R = [0]*N

L[0] = A[0]
R[N-1] = A[N-1]

for n in range(1,N):
    L[n] = gcd(L[n-1],A[n])
    R[N-1-n] =gcd(R[N-n],A[N-1-n])

for n in range(N):
    GCDs[n] = gcd(L[n], R[N-1-n])

print(max(GCDs))

Buggy submission (verdict: Runtime Error):
import math

nn = int(input())
aa = list(map(int, input().split()))
gcd_list = list(range(nn))

for ii in range(nn):
    aa2 = [x for x in aa]
    del aa2[ii]
    gcd0 = aa2[0]
    for jj in range(nn-1):
        gcd0 = math.gcd(gcd0, aa2[jj])
    gcd_list[ii] = gcd0
    
gcd = max(gcd_list)
print(gcd)

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

def gcd(*numbers):
    return reduce(math.gcd, numbers)

nn = int(input())
aa = list(map(int, input().split()))
gcd_list = list(range(nn))

for ii in list(range(nn)):
    aa2 = [x for x in aa]
    del aa2[ii]
    gcd_list[ii] = gcd(*aa2)
    
gcd = max(gcd_list)
print(gcd)
Problem p03126 (python)

Fixed submission:
n,m=map(int,input().split())
l=[0]*(m+1)
for i in range(n):
    a=list(map(int,input().split()))
    for j in range(1,a[0]+1):
        l[a[j]]+=1
if max(l)==n:
    print(l.count(max(l)))
else:
    print(0)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
fav = [0]*M
for n in range(N):
    KA = list(map(int, input().split()))
    for i in range(len(KA)-1):
        fav[KA[i+1]] += 1

counter = 0
for f in fav:
    if f == N:
        counter += 1
    
print(counter)
Problem p03206 (python)

Fixed submission:
D = int(input())

if D == 25:
  print('Christmas')
  
elif D == 24:
  print('Christmas Eve')
  
elif D == 23:
  print('Christmas Eve Eve')
  
else:
  print('Christmas Eve Eve Eve')

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
h = [0]*N

for n in range(N):
    h[n] = int(input())
    
h.sort()

tree = h[:K]
height = []
height.append(tree[-1]-tree[0])

for n in range(K,N):
    tree.pop(0)
    tree.append(h[n])
    height.append(tree[-1]-tree[0])  

print(min(height))
Problem p03192 (python)

Fixed submission:
n = str(input())
print(n.count('2'))

Buggy submission (verdict: Runtime Error):
N = int(input())
H = int(input())
W = int(input())
n = 0
cnt = 0
while n<N:
    A = int(input())
    B = int(input())
    n +=1
    if (H == A and W == B) or (H == A/2 and W == B/2):
        cnt = +1
print(cnt)

Buggy submission (verdict: Runtime Error):
N = int(input())
H = int(input())
W = int(input())
n = 0
while n<N:
    A = int(input())
    B = int(input())
    n +=1
if (H == A and W == B) or (H == A/2 and W == B/2):
    print(cnt = +1)

Buggy submission (verdict: Runtime Error):
N = int(input())
H = int(input())
W = int(input())
while 0<N:
    A = int(input())
    B = int(input())
if (H == A and W == B) or (H == A/2 and W == B/2):
    cnt = +1
print(int(cnt))
Problem p03210 (python)

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

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

if n == 7 or n == 5 or n == 3:
    print('YES')

else
    print('NO')

Buggy submission (verdict: Runtime Error):
n=int(input())
if n%7==0 or n%5==0 or n%3==0:
	ptint('YES')
else:
	print('NO')
Problem p02887 (python)

Fixed submission:
N = input("")
S = input("")
result = int(N)
for i in range(len(S) - 1):
  if S[i] == S[i + 1]:
    result -= 1
print(result)

Buggy submission (verdict: Runtime Error):
#N = input("スライムの数 : ")
#S = input("対応する文字列 : ")
A = input("")
N = A.split("\n")[0]
S = A.split("\n")[1]
result = int(N)
for i in range(len(S) - 1):
  if S[i] == S[i + 1]:
    result -= 1
print(result)

Buggy submission (verdict: Runtime Error):
#N = input("スライムの数 : ")
#S = input("対応する文字列 : ")
result = int(N)
for i in range(len(S) - 1):
  if S[i] == S[i + 1]:
    result -= 1
print(result)

Buggy submission (verdict: Runtime Error):
N = input("スライムの数 : ")
S = input("対応する文字列 : ")
result = N
for i in range(len(S) - 1):
  if S[i] == S[i + 1]:
    result -= 1
print(result)

Buggy submission (verdict: Runtime Error):
N = input("スライムの数 : ")
S = input("対応する文字列 : ")
result = 0
for i in len(S) - 1:
  if S[i] != S[i + 1]:
    result += 1
print(result)
Problem p02730 (python)

Fixed submission:
S=input()
N=len(S)
S1=S[:(N-1)//2]
S2=S[(N+1)//2:]
if S==S[::-1] and S1==S1[::-1] and S2==S2[::-1]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
S=input()
N=len(S)
S1=S[:(N-1)//2]
S2=S[(N+3)//2:]
if S==S[::-1] and S1=S1[::-1] and S2==S2[::-1]:
  print("Yes")
else:
  print("No")

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

Buggy submission (verdict: Runtime Error):
S=list(input())
N=len(S)
S1=S[:(N-1)//2]
S2=S[(N+1)//2:]
if S==S[:-1] and S1=S1[:-1] and S2==S2[:-1]:
  print("Yes")
else:
  print("No")
Problem p02741 (python)

Fixed submission:
M=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
K=int(input())
print(M[K-1])

Buggy submission (verdict: Runtime Error):
M=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
K=int(input())
print(M(K-1))

Buggy submission (verdict: Runtime Error):
M=list(1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51)
K=int(input())

print(M(K))
Problem p02747 (python)

Fixed submission:
S=input()
if S.count("hi")*2==len(S):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
S=input()
if S.count("hi")*2==len(s):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
S=input()
if S.count(hi)>=1:
  print("Yes")
else:
  print("No")
Problem p02783 (python)

Fixed submission:
H,A=map(int,input().split())
N=H//A
if H%A==0:
  print(N)
else:
  print(N+1)

Buggy submission (verdict: Runtime Error):
H,A=map(int,input().split())
count=1
if H%N==0:
  for i in range(H):
    if 0<H:
      H-A
      count+=1
      H-=A
  print(count)
else:
  for i in range(H):
    if 0<H:
      H-A
      count+=1
      H-=A
  print(count+1)
Problem p02789 (python)

Fixed submission:
N,M=map(int,input().split())
if N==M:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N,M=int(input().split())
if N==M:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N,M=map(int,input())
if N==M:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N,M=map(int,input())
if N=M:
  print("Yes")
else:
  print("No")
Problem p02811 (python)

Fixed submission:
K,X=map(int,input().split())
if 500*K>=X:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
K,X=map(int,input().split)
if 500*K<X:
  print("No")
else:
  print("Yes")
Problem p02885 (python)

Fixed submission:
A,B=map(int,input().split())
if A<=B*2:
  print(0)
else:
  print(A-B*2)

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().split())
if A>=2B:
  print(A-2B)
else:
  print(0)