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

Fixed submission:
N=input()
n=int(N)
x=0
for s in range(n):
  ds1,ds2=input().split()
  if ds1==ds2:
    x+=1
  else:
    x=0
  if x==3:
    print("Yes")
    break
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N=input()
n=int(N)
for s in range(n):
  ds1,ds2=input().split()
if ds1==ds2 and d(s+1)1==d(s+1)2 and d(s+2)1==d(s+2)2:
  print("Yes")
else:
  print("No")
Problem p02552 (python)

Fixed submission:
x = input()
y=int(x)
if y==0:
  print("1")
elif y==1:
  print("0")

Buggy submission (verdict: Runtime Error):
x = input()
if x ==0:
  print(1)
else x == 1:
  print(0)
Problem p02598 (python)

Fixed submission:
import sys,math,collections,itertools,heapq
input = sys.stdin.readline

N,K=list(map(int,input().split()))
A = list(map(int,input().split()))
under=0
upper=max(A)
num = upper//2

while True:
    ans = 0
    if num == 0:
        print(1)
        exit()
    for a in A:
        ans += math.ceil(a/num)-1
    if ans >K:
        under = num
        num = math.ceil((num+upper)/2)
    else:
        upper = num
        num = math.floor((num+under)/2)
    if upper-under ==1:
        print(upper)
        break

Buggy submission (verdict: Runtime Error):
import sys,math,collections,itertools,heapq
input = sys.stdin.readline

N,K=list(map(int,input().split()))
A = list(map(int,input().split()))
under=0
upper=max(A)
num = upper//2

while True:
    ans = 0
    for a in A:
        ans += math.ceil(a/num)-1
    if ans >K:
        under = num
        num = math.ceil((num+upper)/2)
    else:
        upper = num
        num = math.floor((num+under)/2)
    if upper-under ==1:
        print(upper)
        break
    if num==0:
        print(1)
        break

Buggy submission (verdict: Runtime Error):
import sys,math,collections,itertools,heapq
input = sys.stdin.readline

N,K=list(map(int,input().split()))
A = list(map(int,input().split()))
under=0
upper=max(A)
num = upper//2

while True:
    ans = 0
    for a in A:
        ans += math.ceil(a/num)-1
    if ans >K:
        under = num
        num = math.ceil((num+upper)/2)
    else:
        upper = num
        num = math.floor((num+under)/2)
    if upper-under ==1:
        print(upper)
        break

Buggy submission (verdict: Runtime Error):
import sys,math,collections,itertools,heapq
input = sys.stdin.readline
def f(n):
    return -1*n

N,K=list(map(int,input().split()))
A = list(map(int,input().split()))
memo = [-1]*(max(A)+1)
memo[0]=0
memo[max(A)]=1
num = max(A)//2
num_upper = max(A)
num_under =0

while True:
    cnt = 0
    tmp = num
    for a in A:
        cnt += math.ceil(a/num)-1
    if cnt <=K:
        memo[num]=1
        num_upper = num
        num = (num+num_under)//2
    else:
        memo[num]=0
        num_under = num
        num = (num+num_upper)//2
    if memo[tmp] == 0 and memo[tmp+1]==1:
        print(tmp+1)
        exit()
    elif memo[tmp]==1 and memo[tmp]==0:
        print(tmp)
        exit()
Problem p02659 (python)

Fixed submission:
import math
a,b=input().split()
c=int(a)
d1=100*c*int(b[0])
d2=10*c*int(b[2])
d3=1*c*int(b[3])
ds=d1+d2+d3
if ds<100:
  print(0)
else:
  print(str(ds)[:-2])

Buggy submission (verdict: Runtime Error):
import math
a,b=input().split()
b=int(float(b)*100)
s=(int(a)*b)
print(str(s[:-2]) if s>99 else 0)

Buggy submission (verdict: Runtime Error):
import math
a,b=input().split()
b=int(float(b)*100)
s=(int(a)*b)
print(srr(s[:-2]) if s>99 else 0)
Problem p02835 (python)

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

if sum(a) >= 22:
    print("bust")
else:
    print("win")

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

if sum(a) >=22:
    print(bust)
else:
    print(win)

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

if sum(a) >=22:
    print(bust)
else:
    print(win)

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

if sum(a) =>22:
    print(bust)
else:
    print(win)

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

if a+b+c => 22:
  print(bust)
else:
  print(win)

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

if a+b+c >= 22:
  print(bust)
else:
  print(win)

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

if a+b+c>21:
  print(bust)
else:
  print(win)
Problem p02847 (python)

Fixed submission:
s = str(input())
 
if s == "SUN":
  print(7)
elif s == "MON":
  print(6)
elif s == "TUE":
  print(5)
elif s == "WED":
  print(4)
elif s == "THU":
  print(3)
elif s == "FRI":
  print(2)
else:
  print(1)

Buggy submission (verdict: Runtime Error):
s = str(input())
 
if s == "SUN":
  print(7)
elif s == "MON":
  print(6)
elif s == "TUE":
  print(5)
elif s == "WED":
  print(4)
elif s == "THU":
  print(3)
elif s == "FRI":
  print(2)
else s == "SUT":
  print(1)

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

if s = "SUM":
  print(7)
elif s = "MON":
  print(6)
elif s = "TUE":
  print(5)
elif s = "WED":
  print(4)
elif s = "THU":
  print(3)
elif s = "FRI":
  print(2)
else s = "SUT":
  print(1)
Problem p02859 (python)

Fixed submission:
r = int(input())

print(r*r)

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

print((r*r)
Problem p02881 (python)

Fixed submission:
n = int(input())
ans = 10**12

for k in range(1,int((n)**0.5)+2):
    if n%k == 0 :
        m = n//k + k - 2
        if ans > m:
            ans = m
print(ans)

Buggy submission (verdict: Runtime Error):
import sys
n = int(input())
ans = 10**12

for k in range(1,(n+1)**0.5):
    if n%k == 0 :
        m = n//k + k - 2
        if ans > m:
            ans = m
        else:
            print(ans)
            sys.exit()
print(ans)
Problem p03042 (python)

Fixed submission:
s = list(input())

for i in range(4):
    s[i] = int(s[i])

a = s[0]*10 + s[1]
b = s[2]*10 + s[3]


if a >= 13 and b >= 13:
    print("NA")
elif a >= 13 and b <= 12:
    if b > 0:
        print("YYMM")
    else:
        print("NA")
elif a <= 12 and b >= 13:
    if a > 0:
        print("MMYY")
    else:
        print("NA")
else:
    if a == 0 and b == 0:
        print("NA")
    elif a == 0:
        print("YYMM")
    elif b == 0:
        print("MMYY")
    else:
        print("AMBIGUOUS")

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

for i in range(4):
    s[i] = int(s[i])

a = s[0]*10 + s[1]
b = s[2]*10 + s[3]


elif a >= 13 and b >= 13:
    print("NA")
elif a >= 13 and b <= 12:
    if b > 0:
        print("YYMM")
    else:
        print("NA")
elif a <= 12 and b >= 13:
    if a > 0:
        print("MMYY")
    else:
        print("NA")
else:
    if a == 0 or b == 0:
        print("NA")
    else:
        print("AMBIGUOUS")
Problem p03835 (python)

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

ans = 0
for x in range(K + 1):
    for y in range(K + 1):
        z = S - (x + y)
        if 0 <= z and z <= K:
            ans += 1

print(ans)

Buggy submission (verdict: Runtime Error):
#include <bits/stdc++.h>
using namespace std;

int main() {
    int K, S; cin >> K >> S;
    long long ans = 0;
    for (int x = 0; x <= K; ++x) {
        for (int y = 0; y <= K; ++y) {
            for (int z = 0; z <= K; ++z) {
                if (x + y + z == S) ans++;
            }
        }
    }
    cout << ans << endl;
}
Problem p02711 (python)

Fixed submission:
N=input()
x=N.count("7")
print("Yes" if x>0
      else "No")

Buggy submission (verdict: Runtime Error):
N=input()
x=N.count(7)
print("Yes" if x>0
      else "No")
Problem p02622 (python)

Fixed submission:
s=input()
b=input()
c=0
for i in range(len(s)):
    if s[i]!=b[i]:
        c=c+1
    else:
        pass
print(c)

Buggy submission (verdict: Runtime Error):
s=input()
b=input()
c=0
for i in len(s):
  if s[i]!=b[i]:
    c=c+1
  else:
    pass
print(c)
Problem p02759 (python)

Fixed submission:
N = int(input())
import math
print(math.ceil(N/2))

Buggy submission (verdict: Runtime Error):
N = int(input())
import math
print(math.celi(N/2))
Problem p02777 (python)

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

Buggy submission (verdict: Runtime Error):
S,T = input().split()
A,B = int(input().split())
U = input()
if U == S:
  	print(A-1,B)
elif U == T:
    print(A,B-1)

Buggy submission (verdict: Runtime Error):
S,T = input().split()
A,B = int(input().split())
U = input()

if S == U:
  	print(A-1,B)
elif T == U:
    print(A,B-1)

Buggy submission (verdict: Runtime Error):
S,T = input().split()
A,B = int(input().split())
U =input()

if S == U:
  	print(A-1,B)
else:
    print(A,B-1)
Problem p03834 (python)

Fixed submission:
x, y, z = input().split(',')
print(x, y, z)

Buggy submission (verdict: Runtime Error):
x,y,z = int().split(',')
print(x,y,z)

Buggy submission (verdict: Runtime Error):
x, y, z = input().split
print(x, y, z)
Problem p02659 (python)

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

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split(' ')
print(int(a*b))
Problem p02729 (python)

Fixed submission:
a, b = map(int, input().split(' '))
print(int(a*(a-1)/2 + b*(b-1)/2))

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

Fixed submission:
[print(t/x)for t,x in[[int(i) for i in input().split()]]]

Buggy submission (verdict: Runtime Error):
[print(t*x)for t,x in[[int(i) for i in　input().split()]]]
Problem p02699 (python)

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

Buggy submission (verdict: Runtime Error):
s=int(input("羊:"))
w=int(input("狼:"))
if s>w:
    print("safe")
else:
    print("unsafe")

Buggy submission (verdict: Runtime Error):
S=int(input("羊:"))
W=int(input("狼:"))
if S>W:
    print("safe")
else:
    print("unsafe")

Buggy submission (verdict: Runtime Error):
S=int(input())
W=int(input())
if S>W:
    print("safe")
else:
    print("unsafe")

Buggy submission (verdict: Runtime Error):
S=int(input("羊:"))
W=int(input("狼:"))
if S>W:
    print("safe")
else:
    print("unsafe")
Problem p02771 (python)

Fixed submission:
a,b,c=[int(x) for x in input().split()]
if a==b and b==c :
    print("No")
elif a!=b and b!=c and a!=c:
    print("No") 
else :
    print("Yes")

Buggy submission (verdict: Runtime Error):
a=int(input("a="))
b=int(input("b="))
c=int(input("c="))
if a==b==c:
    print("No")
if a!=b!=c:
    print("No")
else :
    print("Yes")
Problem p02623 (python)

Fixed submission:
n,m,k=map(int,raw_input().split())
a=map(int,raw_input().split())
b=map(int,raw_input().split())
cnt1=0
cnt2=0
a1=[0]
b1=[0]
for i in range(n):
    a1.append(a1[-1]+a[i])
for i in range(m):
    b1.append(b1[-1]+b[i])
ans=0
j=m
for i in range(n+1):
    if a1[i]>k:
        break
    while b1[j]>k-a1[i]:
        j-=1
    ans=max(ans,i+j)
print ans

Buggy submission (verdict: Runtime Error):
n,m,k=map(int,raw_input().split())
a=map(int,raw_input().split())
b=map(int,raw_input().split())
cnt1=0
cnt2=0
a1=[0]
b1=[0]
for i in range(n):
    a1.append(a1[-1]+a[i])
for i in range(m):
    b1.append(b1[-1]+b[i])
ans=0
j=m
for i in range(n+1):
    if a[i]>k:
        break
    while b[j]>k-a[i]:
        j-=1
    ans=max(ans,i+j)
print ans

Buggy submission (verdict: Runtime Error):
n,m,k=map(int,raw_input().split())
a=map(int,raw_input().split())
b=map(int,raw_input().split())
cnt1=0
cnt2=0
a1=[0]
b1=[0]
for i in range(n):
    a1.append(a1[-1]+a[i])
for i in range(n):
    b1.append(b1[-1]+b[i])
ans=0
j=m
for i in range(n+1):
    if a[i]>k:
        break
    while b[j]>k-a[i]:
        j-=1
    ans=max(ans,i+j)
print ans
Problem p02629 (python)

Fixed submission:
N = int(input())
q = [0]*13
i = 10
n = N
cflag = 0
zflag = 0
str = []
while i != -1:
    q[i] = n // 26 ** i
    mod = n % 26 ** i
    n = mod
    i -= 1
for i in range(12):
    if q[i] == 0:
        zflag = 1
        for j in range(i,13) :
            if q[j] != 0:
                zflag = 0
                break
        if zflag == 1:
             break
        elif cflag == 1:
            str.append("y")
            cflag = 1
        else:
            str.append("z")
            cflag = 1
    elif q[i] == 1 and cflag == 1:
        zflag = 1
        for j in range(i+1,13):
            if q[j] != 0:
                zflag = 0
                break
        if zflag == 1:
            break
        else:
            str.append ("z")
            cflag = 1
    else:
        str.append(chr(q[i] + 96 -cflag))
        cflag = 0

i = len(str) -1
while i >= 0:
    if[str] == '':
        i-=1
        continue
    elif i == 0:
        print(str[i])
        break
    else:
        print(str[i], end="")
        i -= 1

Buggy submission (verdict: Runtime Error):
N = int(input())
q = [0]*12
i = 10
n = N
cflag = 0
str = []
while i != -1:
    q[i] = n // 26 ** i
    mod = n % 26 ** i
    n = mod
    i -= 1
for i in range(12):
    if q[i] == 0 and q[i+1] == 0:
        break
    elif q[i] == 0:
        str.append("z")
        cflag = 1
    elif q[i] == 1 and q[i+1] == 0 and cflag == 1:
        break
    elif q[i] == 1 and cflag == 1:
        str.append ("z")
    else:
        str.append(chr(q[i] + 96 -cflag))
        cflag = 0

i = len(str) -1
while i >= 0:
    if[str] == '':
        i-=1
        continue
    elif i == 0:
        print(str[i])
        break
    else:
        print(str[i], end="")
        i -= 1

Buggy submission (verdict: Runtime Error):
N = int(input())
q = [0]*11
i = 10
n = N
cflag = 0
str = []
while i != -1:
    q[i] = n // 26 ** i
    mod = n % 26 ** i
    n = mod
    i -= 1
for i in range(11):
    if q[i] == 0 and q[i+1] == 0:
        break
    elif q[i] == 0:
        str.append("z")
        cflag = 1
    elif q[i] == 1 and q[i+1] == 0 and cflag == 1:
        break
    elif q[i] == 1 and cflag == 1:
        str.append ("z")
    else:
        str.append(chr(q[i] + 96 -cflag))
        cflag = 0

i = len(str) -1
while i >= 0:
    if[str] == '':
        i-=1
        continue
    elif i == 0:
        print(str[i])
        break
    else:
        print(str[i], end="")
        i -= 1
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):
def main():
    n = int(input())
    a = tuple(map(int, input().split()))
    ans = 0
    lim = max(a)
    amount = [0]*lim
    for i in range(lim):
        amount[i] = a.count(i+1)
        ans += amount[i]*(amount[i]-1)//2
    #print(ans)
    for j in range(n):
        ansout = ans
        #print(amount[a[j]-1])
        ansout -= amount[a[j]-1] -1
        print(ansout)

if __name__ == '__main__':
    main()
Problem p02831 (python)

Fixed submission:
import fractions
a,b = map(int, input().split())
def lcm(x,y):
    return x*y / fractions.gcd(x,y)
print(int(lcm(a,b)))

Buggy submission (verdict: Runtime Error):
import math
a,b = map(int, input().split())
def lcm(x,y):
    return x*y / math.gcd(x,y)
print(lcm(a,b))

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 p03075 (python)

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if (e-a>k):
  print(":(")
else:
  print("Yay!")

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

if (e-a>k):
  print(":(")
else:
  print("Yay!")

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

if e-a>k:
  print(':(')
else:
  print('Yay!')
Problem p02831 (python)

Fixed submission:
import fractions
a=list(map(int,input().split()))
def W(x, y):
    return (x * y) // fractions.gcd(x, y)
print(W(a[0], a[1]))

Buggy submission (verdict: Runtime Error):
import math
a=list(map(int,input().split()))
def W(x, y):
    return (x * y) // math.gcd(x, y)
print(W(a[0], a[1]))

Buggy submission (verdict: Runtime Error):
import math
a=list(map(int,input().split()))
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(a[0], a[1]))

Buggy submission (verdict: Runtime Error):
import math
a=list(map(int,input().split()))
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(a[0], a[1]))
Problem p02881 (python)

Fixed submission:
a=int(input())
c=a+1
for i in range(1,10000000,1):
    if a%i==0:
        b=a/i
        if i+b<=c:
            c=i+b
print(int(c-2))

Buggy submission (verdict: Runtime Error):
a=int(input())
c=a+1
for i in range(10000000000,2,-1):
	if a%i==0:
       b=a/i
       if i+b<c:
       	c=i+b
print(int(c-2))
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, w = int(input().split())

if w >= s:
    print("unsafe")
else:
    print("safe")
Problem p02785 (python)

Fixed submission:
N, K = map(int,input().split())
H = list(map(int,input().split()))
result = 0
if len(H) <= K:
    print(result)
else:
    H.sort()
    result = sum(H[0:N-K])
    print(result)

Buggy submission (verdict: Runtime Error):
N, K = map(int,input().split())
H = list(map(int,input().split()))
result = 0
if len(H) <= K:
    print(result)
else:
    H.sort()
    for i in range(1, K+1):
        H.remove(H[-i])
    result = sum(H)
    print(result)

Buggy submission (verdict: Runtime Error):
N, K = map(int,input().split())
H = list(map(int,input().split()))
result = 0
if len(H) <= K:
    print(result)
else:
    H.sort()
    for i in range(1, K+1):
        H.remove(H[-i])
    for i in H:
        result += i
    print(result)

Buggy submission (verdict: Runtime Error):
N, K = map(int,input().split())
H = list(map(int,input().split()))
H.sort()
result = 0
if len(H) <= K:
    print(result)
else:
    for i in range(1, K+1):
        H.remove(H[-i])
    for i in H:
        result += i
    print(result)
Problem p02622 (python)

Fixed submission:
s=input()
t=input()
ans=0
for i in range(len(s)):
    ans+=(s[i]!=t[i])
print(ans)

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

c = 0
for i in range(len(S)):
  if S[i] != T[i]:
    C += 1
    
print(c)
Problem p02624 (python)

Fixed submission:
n=int(input())
ans=0
for i in range(1,n+1):
    x,y=i,(n//i)*i
    ans+=((n//i)*(x+y)//2)
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
a=0
for i in range(1,n+1):
  x,y=i,(n//i)*i
  a+=((n//i)*(x+y)//2)
print(a)
Problem p02836 (python)

Fixed submission:
S = input()
k = S[::-1]
count = -1
realcount = 0
for i in k:
    count +=1
    if i!=S[count]:
        S.replace(S[count],i)
        realcount+=1
    if realcount == 0:
        real = 0
    else:
        real = realcount//2
print(real)

Buggy submission (verdict: Runtime Error):
count = -1
realcount = 0
for i in k:
    count +=1
    if i!=S[count]:
        S.replace(S[count],i)
        realcount+=1
        if realcount == 0:
            real = 0
        else:
            real = realcount//2
print(real)

Buggy submission (verdict: Runtime Error):
S = input()
k = S[::-1]
count = -1
realcount = 0
for i in k:
    count +=1
    if i!=S[count]:
        S.replace(S[count],i)
        realcount+=1
        real = realcount//2
print(real)
Problem p02622 (python)

Fixed submission:
a=input()
b=input()

good=0
for i in range(len(a)):
    if(a[i]!=b[i]):
        good+=1
print(good)

Buggy submission (verdict: Runtime Error):

a=input()
b=input()
i=0
good=0
while(i<len(a)):
    if(a[i]!=b[i]):
        good+=1
	i+=1
print(good)
Problem p02759 (python)

Fixed submission:
import math
N = int(input())
print(math.ceil(N/2))

Buggy submission (verdict: Runtime Error):
import math
N = int(input().split())
print(math.ceil(N/2))
Problem p02623 (python)

Fixed submission:
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
a, b = [0], [0]
for i in range(N):
    a.append(a[i] + A[i])
for i in range(M):
    b.append(b[i] + B[i])
ans, j = 0, M
for i in range(N + 1):
    if a[i] > K:
        break
    while b[j] > K - a[i]:
        j -= 1
    ans = max(ans, i + j)
print(ans)

Buggy submission (verdict: Runtime Error):
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
a, b = [0], [0]
for i in range(N):
a.append(a[i] + A[i])
for i in range(M):
b.append(b[i] + B[i])
ans, j = 0, M
for i in range(N + 1):
if a[i] > K:
break
while b[j] > K - a[i]:
j -= 1
ans = max(ans, i + j)
print(ans)

Buggy submission (verdict: Runtime Error):
N,M,K = (int(x) for x in input().split())
A = list(map(int, input.split()))
B = list(map(int, input.split()))
i,j = 0
time = 0
while time < K and i < N-1 or j < M-1:
    if A[i] < B[j]:
        time += A[i]
        i += 1
    elif A[i] > B[j]:
        time += B[j]
        j += 1
allbooks = i + j
print(allbooks)
Problem p02622 (python)

Fixed submission:
S = list(input())
T = list(input())
count = 0

for i in range(len(S)):
  if S[i] != T[i]:
    count += 1

print(count)

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

for i in range(len(S)):
  if S[i] != T[i]:
	count += 1

print(count)

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

for i in range(len(S)):
  if S[i] != T[i]
	count += 1

print(count)
Problem p02693 (python)

Fixed submission:
k = int(input())
a, b = map(int,input().split())
for i in range(a, b+1):
    if i%k == 0 :
        print("OK")
        break
else:
    print("NG")

Buggy submission (verdict: Runtime Error):
k = int(input())
a, b = map(int,input().split())
x = k * (a // k) + k
if k == 1:
    print("OK")
elif : x >= a and x <= b:
    print("OK")
else:
    print("NG")
Problem p02836 (python)

Fixed submission:
s = list(input())
sr = []
ans=0
m = len(s)//2

for i in s[::-1]:
    sr.append(i)


for i in range(m):
    if s[i] != sr[i]:
        ans +=1

print(ans)

Buggy submission (verdict: Runtime Error):
s = list(input())
sr = []
ans=0
m = len(s)/2

for i in s[::-1]:
    sr.append(i)


for i in range(m):
    if s[i] != sr[i]:
        ans +=1

print(ans)
Problem p02659 (python)

Fixed submission:
A, B = input().split()
A = int(A)
B = int(float(B) * 1000)
print((A * B) // 1000)

Buggy submission (verdict: Runtime Error):
A, B = input().split()
A = int(A)
B = int(float(B * 100))
print(A * B / 100)
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('{} {}'.format(A, B))

Buggy submission (verdict: Runtime Error):
S, T = input().split()
A, B = map(int, input().split())
U = input()
if S == U:
    A -= 1
else:
    B -= 1
print(f'{A} {B}')
Problem p02831 (python)

Fixed submission:
from fractions import gcd
a,b=map(int,input().split())
print(a*b//gcd(a,b))

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

Fixed submission:
a = int(input())
s = input()
print(s if a >= 3200 else "red")

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

if a >= 3200:
    print(s)
else
    print("red")

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

if a >= 3200:
  print(s)
else
  print("red")
Problem p02773 (python)

Fixed submission:
from collections import defaultdict

n = int(input())
counts = defaultdict(int)

for _ in range(n):
    counts[input().strip()] += 1

vec = sorted([(value, key) for key, value in counts.items()])
best = vec[-1][0]
keys = sorted([key for value, key in vec if value == best])
for key in keys:
    print(key)

Buggy submission (verdict: Runtime Error):
from collections import defaultdict

n = int(input())
counts = defaultdict(int)

for _ in range(n):
    counts[input().strip()] += 1

vec = sorted([(-value, key) in counts.items()], reverse=True)
best = vec[0][0]
for v, s in vec:
    if v != best:
        break
    print(s)