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

Fixed submission:
N,Ma,Mb = map(int,input().split())
dp = [[[10**9 for i in range(401)] for j in range(401)] for k in range(N+1)]
dp[0][0][0] = 0
for i in range(1,N+1):
    a,b,c = map(int,input().split())
    for j in range(401):
        for k in range(401):
            if j < a:
                dp[i][j][k] = dp[i-1][j][k]
            else:
                if k < b:
                    dp[i][j][k] = dp[i-1][j][k]
                else:
                    dp[i][j][k] = min(dp[i-1][j][k],dp[i-1][j-a][k-b] + c)
m = max(Ma,Mb)
import math
n = math.floor(400 / m)
ans = 10**9
for i in range(1,400):
    x = Ma*i
    y = Mb*i
    if x > 400:
        break
    if y > 400:
        break
    ans = min(dp[N][x][y],ans)
if ans == 10**9:
    print(-1)
    quit()
print(ans)

Buggy submission (verdict: Runtime Error):
N,Ma,Mb = map(int,input().split())
dp = [[[10**9 for i in range(400)] for j in range(400)] for k in range(N+1)]
dp[0][0][0] = 0
for i in range(1,N+1):
    a,b,c = map(int,input().split())
    for j in range(401):
        for k in range(401):
            if j < a:
                d[i][j][k] = d[i-1][j][k]
            else:
                if k < b:
                    d[i][j][k] = d[i-1][j][k]
                else:
                    d[i][j][k] = min(d[i-1][j][k],d[i-1][j-a][k-b] + c)
m = max(Ma,Mb)
import math
n = math.floor(400 / m)
ans = 10**9
for i in range(n):
    x = Ma*i
    y = Mb*i
    ans = min(dp[N][x][y])
print(ans)
Problem p03834 (python)

Fixed submission:
s = input()
a = s[0]+s[1]+s[2]+s[3]+s[4]
b = s[6]+s[7]+s[8]+s[9]+s[10]+s[11]+s[12]
c = s[14]+s[15]+s[16]+s[17]+s[18]
print(a,b,c)

Buggy submission (verdict: Runtime Error):
a,b,c = map(str,input().split(,))
print(a,b,c)
Problem p03835 (python)

Fixed submission:
K,S = map(int,input().split())
ans = 0
for i in range(K+1):
    if i > S:
        break
    for j in range(K+1):
        if i + j > S:
            break
        elif 0 <= S - (i + j) <= K:
            ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
K,S = int(input())
ans = 0
for i in range(K):
    for j in range(K):
        for k in range(K):
            V = i + j + k
            if V == S:
                ans += 1
                break
            elif V > S:
                break
    
    
print(ans)

Buggy submission (verdict: Runtime Error):
K,S = int(input())
ans = 0
for i in range(K):
    for j in range(K):
        for k in range(K):
            V = i + j + k
            if V = S:
                ans += 1
                break
            elif V > S:
                break
    
    
print(ans)
Problem p03986 (python)

Fixed submission:
S = input()
n = len(S)
ans = 0
s = 0
t = 0
for i in range(n):
    x = S[i]
    if x == 'S':
        s += 1
    else:
        if s > 0:
            s -= 1
        else:
            ans += 1
ans += s
print(ans)

Buggy submission (verdict: Runtime Error):
S = input()
n = len(S)
ans = 0
s = 0
t = 0
for i in range(N):
    x = S[i]
    if x == 'S':
        s += 1
        if t > 0:
            if s > t:
                s -= t
            else:
                t = t-s
                ans += t
                s = 0
        else:
            t += 1
ans += s
print(ans)
Problem p02546 (python)

Fixed submission:
s = input()
l = len(s)
x = s[l-1]
if x == "s":
    print(s + "es")
else:
    print(s + "s")

Buggy submission (verdict: Runtime Error):
n = int(input())
m = 2
z = 0

for i in range(n-2):
    def factorization(n):
        arr = []
        temp = n
        for i in range(2, int(-(-n**0.5//1))+1):
            if temp%i==0:
                cnt=0
                while temp%i==0:
                    cnt+=1
                    temp //= i
                arr.append([i, cnt])

        if temp!=1:
            arr.append([temp, 1])

        if arr==[]:
            arr.append([m, 1])

        return arr

    x = 0
    y = 1

    r = factorization(m)
    l = len(r)

    for i in range(l):
        y = y * (r[x][1]+1)
        x+=1


    m+=1
    z = z + y

print(z+1)

Buggy submission (verdict: Runtime Error):
n = int(input())
m = 2
z = 0

for i in range(n-2):
    def factorization(n):
        arr = []
        temp = n
        for i in range(2, int(-(-n**0.5//1))+1):
            if temp%i==0:
                cnt=0
                while temp%i==0:
                    cnt+=1
                    temp //= i
                arr.append([i, cnt])

        if temp!=1:
            arr.append([temp, 1])

        if arr==[]:
            arr.append([m, 1])

        return arr

    x = 0
    y = 1

    r = factorization(m)
    l = len(r)

    for i in range(l):
        y = y * (r[x][1]+1)
        x+=1


    m+=1
    z = z + y

print(z+1)
Problem p02595 (python)

Fixed submission:
import math
i = 0
a = 0
N, D = map(int, input().split())

while(i < N):
    X, Y = map(int, input().split())
    j = math.sqrt(X ** 2 + Y ** 2)
    if j <= D:
        a+=1
    i+=1

print(a)

Buggy submission (verdict: Runtime Error):
import math
i = 0
a = 0
N, D = map(int, input().split())

while(i < N)
    X, Y = map(int, input().split())
    j = math.sqrt(X ** 2 + Y ** 2)
    if j <= D:
        a+=1
    i+=1

print(a)

Buggy submission (verdict: Runtime Error):
import math

a = 0
N, D = map(int, input().split())

for (int i = 0; i < N; i++)
    X, Y = map(int, input().split())
    j = math.sqrt(X ** 2 + Y ** 2)
    if j <= D:
        a+=1

print(a)

Buggy submission (verdict: Runtime Error):
import math

int a;
N, D = map(int, input().split())

for(int i = 0; i < N; i++)
  X, Y = map(int, input().split())
  j = math.sqrt(X**2+Y**2)
  if j <= D:
    a++

pinrt(a)
Problem p02577 (python)

Fixed submission:
N = int(input())

if N % 9 == 0:
    print("Yes")
else:
    print("No")

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

if n % 9 == 0:
    print('YES')
else:
    print('No')
Problem p02699 (python)

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

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

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

if S > W:
    print('safe')

elif S < W:
    print('unsafe')

Buggy submission (verdict: Runtime Error):
python3 make.py abc 999 --num 6

S, W = [int(x) for x in input().split()]

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

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

if S > W:
    print('safe')

elif S < W:
    print('unsafe')
Problem p02951 (python)

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

print(max(0,c-(a-b)))

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

print(mak(0,c-(a-b)))

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

print(max(o,c-(a-b)))
Problem p02552 (python)

Fixed submission:
x=int(input())
if x==0:
  x=1
else:
  x=0
print(x)

Buggy submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split())
print(max(a*c,a*d,b*c,b*d))
Problem p02659 (python)

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

Buggy submission (verdict: Runtime Error):
A,B=input().split()
A=int(A)
B=int(B*100)
print(A*B//100)

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().split())
B=100*B
print(A*B//2)
Problem p02701 (python)

Fixed submission:
N=int(input())
S=[]
for i in range(N):
  S.append(str(input()))
print(len(set(S)))

Buggy submission (verdict: Runtime Error):
N=int(input())
for i in range(N):
  S[i+1]=str(input())
print(len(set(S)))
Problem p02753 (python)

Fixed submission:
S=input()
if S=="AAA" or S=="BBB":
  print("No")
else:print("Yes")

Buggy submission (verdict: Runtime Error):
S=input()
if s="AAA" or s="BBB":
  print("No")
else:print("Yes")

Buggy submission (verdict: Runtime Error):
S=input()
if s="aaa" or s="bbb":
  print("No")
else:print("Yes")
Problem p02771 (python)

Fixed submission:
A=list(map(int,input().split()))
B=len(set(A))
if B==2:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input().split()))
g='APPROVED'
for i in A:
    if i%2 == 0:
        if i%3 != 0 and i%5 != 0:
            g='DENIED'
            break
print(g)

Buggy submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input().split()))
g='APPROVED'
for i in range(N):
    if A[i]%2 == 0:
        if A[i]%3 != 0 and A[i]%5 != 0:
            g='DENIED'
            break
print(g)

Buggy submission (verdict: Runtime Error):
A=map(list(int,input().split()))
B=len(set(A))
if B==2:
    print('Yes')
else:
    print('No')
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):
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):
s,t=str(input(),split())
a,b=int(input(),split())
u=str(input())
if u==s:
  a-=1
else:
  b-=1
print(a,b)
Problem p02831 (python)

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

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

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

Fixed submission:
S=input()
cnt=0
for i in range(len(S)//2):
  if S[i]!=S[-i-1]:
    cnt+=1
print(cnt)

Buggy submission (verdict: Runtime Error):
S=input()
cnt=0
for i in range(S//2):
  if S[i]!=S[-i]:
    cnt+=1
print(cnt)
Problem p02915 (python)

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

Buggy submission (verdict: Runtime Error):
import math
N=int(input())
print(math.factorial(N)/math.factorial(N-3)
Problem p02916 (python)

Fixed submission:
N=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=list(map(int,input().split()))
max=sum(b)

for i in range(N-1):
    if a[i]==a[i+1]-1:
            max+=c[a[i]-1]
print(max)

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

for i in range(N):
    max=max+b[a[i]]+c[a[i-1]]
print(max)

Buggy submission (verdict: Runtime Error):
N=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=list(map(int,input().split()))
c.append(0)
max=0

for i in range(1,N+1):
    max=max+b[a[i]]+c[a[i-1]]
print(max)
Problem p02726 (python)

Fixed submission:
import sys

n, x, y = map(int, input().split())
x -= 1
y -= 1

def calc(i, j, x, y):
    mindist = abs(j - i)
    mindist = min(mindist, abs(x - i) + 1 + abs(y - j))
    mindist = min(mindist, abs(y - i) + 1 + abs(x - j))
    return mindist

result = [0 for i in range(n)]
for i in range(n):
    for j in range(n):
        if i == j :
            continue
        k = calc(i, j, x, y)       
        result[k] += 1

for i in range(1, n):
    print(result[i] // 2)

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

n, x, y = map(int, input().split())
x -= 1
y -= 1

def calc(i, j, x, y):
    mindist = abs(j - i)
    mindist = min(mindist, abs(x - i) + 1 + abs(y - j))
    mindist = min(mindist, abs(y - i) + 1 + abs(x - j))
    return mindist

result = [0 for i in range(n)]
dist = np.zeros((n, n))
for i in range(n):
    for j in range(n):
        if i == j :
            continue
        k = calc(i, j, x, y)       
        dist[i][j] = k
        result[k] += 1

for i in range(1, n):
    print(result[i] // 2)
Problem p02597 (python)

Fixed submission:
import sys

N = int(input())
c = list(input())

r = c.count("R")
if r == 0 :
    print(0)
    sys.exit()   
rs = c[:r]
rsw = rs.count("W")
a = rsw

w = list(reversed(c)).index("R")
w = (N - 1) - w
ws = c[:w]
b = ws.count("W")
print(min(a,b))

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

r = c.count("R")
rs = c[:r]
rsw = rs.count("W")
a = rsw

w = list(reversed(c)).index("R")
w = (N - 1) - w
ws = c[:w]
b = ws.count("W")

print(min(a,b))

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

r = c.count("R")
rs = c[:r]
rsr = rs.count("R")
a = r-rsr

w = list(reversed(c)).index("R")
w = (N - 1) - w
ws = c[:w]
b = ws.count("W")

print(min(a,b))
Problem p02629 (python)

Fixed submission:
n = int(input())
ans = ""
while n > 0 :
    n -= 1
    ans += chr(ord("a") + n%26)
    n = n//26
print(ans[::-1])

Buggy submission (verdict: Runtime Error):
n = int(input())
n = n - 1
ans = []
while n > 0 :
    a = n%26
    n = n//26
    ans.append(chr(a+96))
ans[0] = chr(ord(ans[0]) + 1)
ans = list(reversed(ans))
print("".join(ans))
Problem p02699 (python)

Fixed submission:
S , W = (int(a) for a in input().split())
if S <= W :
    print("unsafe")
else : print("safe")

Buggy submission (verdict: Runtime Error):
S , W = (int(a) for a in input().split())
if S <= W :
    prit("unsafe")
else : print("safe")
Problem p03038 (python)

Fixed submission:
N , M = (int(a) for a in input().split())
A = list(map(int,input().split()))
BC = [[int(a) for a in input().split()] for l in range(M)]
A =sorted(A)
BC = sorted(BC , key = lambda x: - x[1])
s = 0

for i in range(N*M) :
    if A[i] < BC[s][1] :
        A[i] = BC[s][1]
    else : break
    BC[s][0] -= 1
    if BC [-1][0] == 0 or i == N-1 :
        break
    if BC[s][0] == 0 :
        s += 1

print(sum(A))

Buggy submission (verdict: Runtime Error):
N , M = (int(a) for a in input().split())
A = list(map(int,input().split()))
BC = [[int(a) for a in input().split()] for l in range(M)]
A =sorted(A)
BC = sorted(BC , key = lambda x: - x[1])
x = 0

for i in range(N*M) :
    if A[i] < BC[x][1] :
        A[i] = BC[x][1]
    else : break
    BC[x][0] -= 1
    if BC [-1][0] == 0:
        break
    if BC[x][0] == 0 :
        x += 1

print(sum(A))
Problem p02546 (python)

Fixed submission:
a = input()
if(a[-1]=="s"):
    a+="es"
else:
    a+="s"
print (a)

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

def f(x,m):
    return x%m

ans = 0

for i in range(n):
    ans += x
    x = f(x**2,m)

print(ans)
Problem p02759 (python)

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

Buggy submission (verdict: Runtime Error):
n,m= map(int,input().split())
check=[-1]*n
for i in range(m):
    s,c=map(int,input().split())
    s-=1
    if(check[s]!=-1 and check[s]!=c):
        print(-1)
        exit()
    check[s]=c
#print(check)
if(check[0]==0):
    if(n==1):
      print(0)
    else:
      print(-1)
    exit()
elif(check[0]==-1):
    check[0]=1

for i in range(n):
    if(check[i]==-1):
        check[i]=0
    print(check[i],end="")
Problem p02831 (python)

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

Buggy submission (verdict: Runtime Error):
x,y = map(int,input().split())
print(int(x*y/gcd(x,y)))

Buggy submission (verdict: Runtime Error):
x,y = map(int,input().split())
print(x*y//gcd(x,y))

Buggy submission (verdict: Runtime Error):

x,y = map(int,input().split())
import math
print(int((x * y) / math.gcd(x, y)))

Buggy submission (verdict: Runtime Error):
import math
li = input().split()	
x=int(li[0])
y=int(li[1])
print((x * y) // math.gcd(x, y))

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

Buggy submission (verdict: Runtime Error):
import math
x,y = map(int,input().split())
print(math.gcd(x, y))
Problem p02859 (python)

Fixed submission:
r = int(input())
print(r**2)

Buggy submission (verdict: Runtime Error):
N = int(input())
data = []
sum = 0
x = 0
y = 1
ss=[0,0,2,4,18,96,600,4320,35280]
for i in range(N):
    data.append( list(map(int,input().split())))
for i in range(N -1):
    for j in range(N - 1):
        if(j+1+i==N):
            break
        sum+=((data[i][x]-data[j+1+i][x])**2+(data[i][y]-data[j+1+i][y])**2)**0.5

print(sum*ss[N]/N)
Problem p02897 (python)

Fixed submission:
n=int(input())
if(n%2==0):
  print(0.5)
else:
  print((n-int(n/2))/n)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
for i in range(n):
  print(str(a.index(i+1)+1),end=" ")

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
A= []
for i in range(n):
  A.append(a.index(i+1))
for i in range(n):
  print(A[i]+1, end=" ")

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
A= []
for i in range(n):
  A.append(a.index(i+1))
for i in range(n):
  print(A[i]+1, end=" ")

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
A= []
for i in range(n):
  A.append(a.index(i+1))
for i in range(n):
  print(A[i]+1, end=" ")
Problem p02951 (python)

Fixed submission:
a,b,c=map(int,input().split())
if(c-a+b > 0):
  print(c-a+b)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
N=int(input())
all=0
a=5
while(a>0):
  if(10**a>N):
    a-=1
    continue
  if(a%2==1):
    all+=9*10**(a-1)
    a-=1
    continue
  else:
    all+=N+1-10**a
  
  a-=1

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split)
print(c-a+b);
Problem p02546 (python)

Fixed submission:
s = input()
l = []
for i in s:
  l.append(i)
if l[-1] == 's':
    l.append('es')
    print("".join(j for j in l))
else:
    l.append('s')
    print("".join(j for j in l))

Buggy submission (verdict: Runtime Error):
s = input()
if l[-1] == 's':
    s += 'es'
else:
    s += 's'
Problem p03207 (python)

Fixed submission:
n = int(input())
p=[int(input()) for i in range(n)]
print(sum(p)-max(p)//2)

Buggy submission (verdict: Runtime Error):
n = int(input())
p=[int,input() for i in range(n)]
print(sum(p)-max(p)//2)
Problem p02546 (python)

Fixed submission:
s = input()

if s[-1] == 's':
    print(s+'es')
else:
    print(s+'s')

Buggy submission (verdict: Runtime Error):

N = int(input())
cnt = 0 
for a in range(1,N//2+1):
    for b in range(a,N):
        if N - a * b > 0:
            if a == b:
                cnt += 1
            else:
                cnt += 2
print(cnt)
Problem p03053 (python)

Fixed submission:
from sys import stdin
from collections import deque
def main():
    readline = stdin.readline
    H,W = map(int,readline()[:-1].split())
    A = ['' for i in range(H)]
    visited = [[False] * W for i in range(H)]
    q = deque()
    for i in range(H):
        A[i] = readline()[:-1]
        # print(A[i])
        for j,color in enumerate(A[i]):
            if '#' == color:
                q.append([i,j,0])
                visited[i][j] = True
            # for i in visited:
            #     print(i)
    mx = 0
    direction = [[1,0],[0,1],[-1,0],[0,-1]]
    op = -1
    while len(q) > 0:
        # print(q)
        tmp = [y,x,op] = q.popleft()
        # print(tmp)
        mx = mx if mx > op else op
        for [dx,dy] in direction:
            ny,nx = y + dy , x + dx
            if  0 <= ny and ny < H and 0 <= nx and nx < W:
                if A[ny][nx] == '#' or visited[ny][nx] == True:
                    continue
                q.append([ny,nx,op+1])
                visited[ny][nx] = True
    print(op)

main()

Buggy submission (verdict: Runtime Error):
from sys import stdin
readline = stdin.readline
H,W = map(int,input().split())
A = ['' for i in range(H)]
colors = [[-2 for j in range(W)] for i in range(H)]
q = []
for i in range(H):
    A[i] = list(readline())
    for j,color in enumerate(A[i]):
        colors[i][j] = 0 if color == '#' else -1
        if '#' == color:
            q.append([i,j,0])
            colors[i][j] = 0
# for i in colors:
#     print(i)
mx = 0
direction = [[1,0],[0,1],[-1,0],[0,-1]]

while len(q) > 0:
    # print(q)
    tmp = [y,x,op] = q.pop(0)
    mx = max(mx,op)
    if colors[y][x] >= 0 and mx > 0: continue
    for [dx,dy] in direction:
        ny,nx = y + dy , x + dx
        if  0 <= ny and ny < H and 0 <= nx and nx < W:
            if A[ny][nx] == '#' or colors[ny][nx] >= 0:
                continue
            q.append([ny,nx,op+1])
            colors[y][x] = op+1
print(mx)
Problem p02546 (python)

Fixed submission:
s = input()
if s[-1] == 's':
    s += 'es'
else:
    s += 's'
print(s)

Buggy submission (verdict: Runtime Error):
s = input()
if s[-1] == 's':
  s.append('es')
else:
  s.append('s')
print(s)
Problem p02552 (python)

Fixed submission:
print(1 - (int(input())))

Buggy submission (verdict: Runtime Error):
print(1 - int(input())
Problem p02546 (python)

Fixed submission:
n=input()
if n[-1]=='s':
    print(n+'es')
else :
    print(n+'s')

Buggy submission (verdict: Runtime Error):
a=input()
if a[-1]==s:
  print(a+'es')
else:
  print(a+'s')
Problem p02578 (python)

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
a=0
s=[]
for i in A:
  if i<a:
    s.append(a-i)
    
  else:
    a=i
print(sum(s))

Buggy submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input().split()))
a=0
s=[]
for i in A:
  if i<a:
    s.append(a-i)
    print(s)
  else:
    a=i
print(sum(s))

Buggy submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input()))
a=0
s=[]
for i in range(A):
  if i<a:
    s.append(i-a)
    a=i
print(sum(s))
Problem p02627 (python)

Fixed submission:
N=input()
if N==N.upper():
  print('A')
else :
  print('a')

Buggy submission (verdict: Runtime Error):
N=int(input())
if N==N.upper():
  print('A')
else :
  print('a')
Problem p02693 (python)

Fixed submission:
k=int(input())
a,b=list(map(int,input().split()))
x=0
while True:
  x+=k
  if a<=x<=b:
    print('OK')
    break
  if x>b:
    print('NG')
    break

Buggy submission (verdict: Runtime Error):
k=int(input())
a,b=list(map(int,input().split()))
while True:
  x+=k
  if a<=x<=b:
    print('OK')
    break
  if x>b:
    print('NG')
    break
Problem p02711 (python)

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

Buggy submission (verdict: Runtime Error):
a=int(input())
if '7' in a:
  print('Yes')
else:
  print('No')

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

Fixed submission:
a,b,c,d,e,f=input()
if c==d and e==f:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
a,b,c,d,e,f=input()
if c==d and e==f:
  print(
Problem p02753 (python)

Fixed submission:
N=input()
if  all(n=='A'  for n in N):
  print('No')
elif all(n=='B' for n in N):
  print('No')
else:
  print('Yes')

Buggy submission (verdict: Runtime Error):
n=input()
if  all(n=='A' or n=='B'):
  print('No')
else :
  print('Yes')
Problem p02771 (python)

Fixed submission:
a=input().split()
if (a[0]==a[1] and a[1]==a[2] and a[0]==a[2] )or (a[0]!=a[1] and a[1]!=a[2] and a[0]!=a[2]):
  print('No')
else:
  print('Yes')

Buggy submission (verdict: Runtime Error):
a,b,c=list(map(int,input().splilt()))
if a==b==c or a!=b!=c:
  print('No')
else:
  print('Yes')
Problem p02897 (python)

Fixed submission:
N=int(input())
if N%2==0:
  print('{:.010f}'.format((N//2)/N))
else:
  print('{:.010f}'.format((N//2+1)/N))

Buggy submission (verdict: Runtime Error):
N=int(input())
if N%2==0:
  print('{:.06}'.format(N//2))
else:
  print('{:.06}'.format(N//2+1))
Problem p02933 (python)

Fixed submission:
x=int(input())
a=input()
if x>=3200:
  print(a)
else:
  print('red')

Buggy submission (verdict: Runtime Error):
X=int(input())
a=input()
if x>=3200:
  print(a)
else:
  print('red')
Problem p03011 (python)

Fixed submission:
a=list(map(int,input().split()))
b=sorted(a)
print(int(b[0])+int(b[1]))

Buggy submission (verdict: Runtime Error):
a=list(map(int,input().split()))
b=a.sorted()
print(int(b[0])+int(b[1]))

Buggy submission (verdict: Runtime Error):
a=list(map(int,input().split()))
b=a.sorted()
print(b[0]+b[1])
Problem p03041 (python)

Fixed submission:
a,b=list(map(int,input().split()))
c=list(input())
d=c[b-1].swapcase()
c[b-1]=d
c=''.join(c)
print(c)

Buggy submission (verdict: Runtime Error):
a,b=list(map(int,input().split()))
c=list(input())
d=c[b-1].swapcase()
c[b]=d
c=''.join(c)
print(c)

Buggy submission (verdict: Runtime Error):
a,b=list(map(int,input().split()))
c=input().split()
d=c[b].swapecase()
c[b]=d
print(c)
Problem p03250 (python)

Fixed submission:
a=list(map(int,input().split()))
a=sorted(a)
d=str(a[2])+str(a[1])
print(int(d)+a[0])

Buggy submission (verdict: Runtime Error):
a=list(map(int,input().split))
a=sorted(a)
d=str(a[2])+str(a[1])
print(int(d)+a[0])