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

Fixed submission:
k = int(input())
a, b = map(int, input().split(" "))
ngflag = True
while(a <= b):
    if a % k == 0:
        print("OK")
        ngflag = False
        break
    a += 1
if ngflag:
    print("NG")

Buggy submission (verdict: Runtime Error):
ut())
a, b = map(int, input().split(" "))
ngflag = True
while(a <= b):
    if a % k == 0:
        print("OK")
        ngflag = False
        break
    a += 1
if ngflag:
    print("NG")
Problem p02766 (python)

Fixed submission:
n, k = map(int, input().split())

ans = 1
while(True):
    n = n//k
    if(n == 0):
        break
    ans += 1

print(ans)

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

ans = 1
while(True):
    n = n//k
    if(n == 0):
        break
    ans += 1

print(ans)
Problem p02571 (python)

Fixed submission:
input_list = [input() for i in range(2)]
M = input_list[0]
N = input_list[1]

ans = []

for i in range(len(M)-len(N)+1):

    num = 0

    substring = input_list[0][i:i+len(N)]

    for j in range(len(N)):

        if substring[j] != N[j]:

            num += 1

    ans.append(num)

print(min(ans))

Buggy submission (verdict: Runtime Error):
ans = []

for i in range(M-N+1):

    num = 0

    substring = input_list[0][i:i+N]

    for j in range(len(substring)):

        if substring[j] != input_list[1][j]:

            num += 1

    ans.append(num)

print(min(ans))
Problem p02819 (python)

Fixed submission:
import math
def is_prime(x):
    n = math.floor(math.sqrt(x))
    for i in range(2,n+1):
        if x % i == 0:
            return False
    return True            
a = int(input())
while not(is_prime(a)):
    a += 1    
print(a)

Buggy submission (verdict: Runtime Error):
def is_prime(x):
    n = math.floor(math.sqrt(x))
    for i in range(2,n+1):
        if x % i == 0:
            return False
    return True            
a = int(input())
while not(is_prime(a)):
    a += 1    
print(a)
Problem p02987 (python)

Fixed submission:
s = list(map(str, input()))

if s.count(s[0])==2:
    s_rm = [i for i in s if i != s[0]]
    if s_rm[0] == s_rm[1]:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Buggy submission (verdict: Runtime Error):

from math import lgamma
lfact = lambda n: lgamma(n + 1)
cmb = lambda n, r: lfact(n) - lfact(n - r) - lfact(r)

n,k = map(int,input().split())

#def cmb(n, k):
#    m = 1
#    if n < 2 * k:
#        k = n - k
#    for i in range(1, k + 1):
#        m = m * (n - i + 1) / i    
#    return m

for i in range(1,k+1):
    print(
            int(cmb(k-1, i-1) * cmb(n-k+1, i) % (10**9+7))
            )

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

ans = 0

for k in range(min(l)+1, max(l)):
    l_abc = [i for i in l if i < k]
    l_arc = [i for i in l if i >= k]
    if len(l_abc) == len(l_arc):
        ans += 1

print(ans)

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

ans = 0

for i in range(n-2):
    tmp = list([l[i],l[i+1],l[i+2]])
    if max(tmp) != tmp[1] and min(tmp) != tmp[1]:
        ans += 1
print(ans)

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

if s.count("S")==2:
    s_rm = s.remove("S")
    if s_rm[0] == s_rm[1]:
        print("Yes")
    else:
        print("No")
else:
    print("No")
Problem p02753 (python)

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

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

Buggy submission (verdict: Runtime Error):
intxt = input()
p = ""
ok = 0
for i in range(0,3):
  if intxt[i] != p:
    ok += 1
  p = intxt[i]
if ok == 1:
  print("Yes")
else:
  print("No)

Buggy submission (verdict: Runtime Error):
intxt = input()
p = ""
ok = 0
for i in intxt:
  if i != p:
    ok += 1
  p = i
if ok == 2:
  print("Yes")
else:
  print("No)

Buggy submission (verdict: Runtime Error):
intxt = input()
p = ""
ok = 0
for i in intxt:
  if i != p:
    ok += 1
  p = i
if ok == 1:
  print("Yes")
else:
  print("No)
Problem p02990 (python)

Fixed submission:
def ncr(n,r):
    if n==r: return 1
    if n<=0 or n<r:return 0
    r=min(r,n-r)
    a=1
    b=1
    for i in range(r):
        a*=n-i
        b*=r-i
    return a//b

n,k=map(int,input().split())
b=k
a=n-k
for i in range(1,k+1):
    print(int((ncr(a+1,i)*ncr(b-1,i-1))%1000000007))

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
b=k
a=n-k
for i in range(1,k+1):
    ans=1
    for j in range(i):
        ans*=a+1-j
        ans/=i-j
    for x in range(i-1):
        ans*=b-1-x
        ans/=i-1-x
    print(int(ans%1000000007))

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
b=k
a=n-k
for i in range(1,k+1):
    if a+1<i:
        print("0")
        continue
    ans=1
    for j in range(i):
        ans*=a+1-j
        ans/=i-j
    for x in range(i-1):
        ans*=b-1-x
        ans/=i-1-x
    print(int(ans%1000000007))

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
b=k
a=n-k
for i in range(1,k+1):
    if a+1<i:print("0")
    ans=1
    for j in range(i):
        ans*=a+1-j
        ans/=i-j
    for x in range(i-1):
        ans*=b-1-x
        ans/=i-1-x
    print(int(ans%1000000007))
Problem p03329 (python)

Fixed submission:
import sys

sys.setrecursionlimit(2000000)

def re(r,k,l):
    if k==0:return r
    while(k<l[0]):
        l=l[1:]
    return re(r+1,k-l[0],l)





n=int(input())
i=1
l6=[]
ans=10**5
while(i<=n):
    l6.append(i)
    i*=6
i=1
l9=[]
while(i<=n):
    l9.append(i)
    i*=9
l6.sort(reverse=True)
l9.sort(reverse=True)
for i in range(n+1):
    ans=min(ans,re(0,n-i,l6)+re(0,i,l9))
print(ans)

Buggy submission (verdict: Runtime Error):
import sys

sys.setrecursionlimit(2000000)

def re(r,k,l):
    if k==0:return r
    while(k<l[0]):
        l=l[1:]
    return re(r+1,k-l[0],l)





n=int(input())
i=1
l6=[]
ans=10**5
while(i<n):
    l6.append(i)
    i*=6
i=1
l9=[]
while(i<n):
    l9.append(i)
    i*=9
l6.sort(reverse=True)
l9.sort(reverse=True)
for i in range(n+1):
    ans=min(ans,re(0,n-i,l6)+re(0,i,l9))
print(ans)

Buggy submission (verdict: Runtime Error):
def re(r,k,l):
    if k==0:return r
    while(k<l[0]):
        l=l[1:]
    return re(r+1,k-l[0],l)





n=int(input())
i=1
l6=[]
ans=10**5
while(i<n):
    l6.append(i)
    i*=6
i=1
l9=[]
while(i<n):
    l9.append(i)
    i*=9
l6.sort(reverse=True)
l9.sort(reverse=True)
for i in range(n):
    ans=min(ans,re(0,n-i,l6)+re(0,i,l9))
print(ans)
Problem p02624 (python)

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

Buggy submission (verdict: Runtime Error):
N = int(input())
ans = 0
for i in range(1,N+1):
    last = N//j
    ans += ((1+last)*last//2)*i
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
import sympy
num = 0
for i in range(1,N+1):
    num += i*sympy.divisor_count(i)
print(num)

Buggy submission (verdict: Runtime Error):
N = int(input())
import sympy
num = 0
for i in range(1,N+1):
    num += i*sympy.divisor_count(i)
print(num)
Problem p02629 (python)

Fixed submission:
n = int(input())
al=["z"]+[chr(ord('a') + i) for i in range(25)]
result = ""
while n>0:
    if n%26 !=0:
        result = al[n%26]+result
        n //= 26
    else:
        result = al[n%26]+result
        n //= 26
        n -= 1
print(result)

Buggy submission (verdict: Runtime Error):
N = int(input())
def convert(n,k):
    result = ""
    while n>0:
        result = al[(n%k)-1]+result
        n //= k
    return result
print(convert(N,26))
Problem p02659 (python)

Fixed submission:
from decimal import *
A,B = map(str,input().split())
print(int(Decimal(A)*Decimal(B)))

Buggy submission (verdict: Runtime Error):
A,B = map(float,input().split())
Aint = int(A)
Bint = int(B*100)
print(int((A*B100)//100))
Problem p02693 (python)

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

for i in range(0,B-A+1):
    if (A+i)%K==0:
        print("OK")
        sys.exit()
else:
    print("NG")

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

if N<= B-1:
    ans = (N*A)//B
else:
    ans = ((B-1)*A)//B
    
print(ans)
Problem p02723 (python)

Fixed submission:
S = input()

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

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

B = [K]*N
for i in range(N):
    B[i] += A[i]
    
C = A+B

for i in range(2*N):
    ans = 2*K
    l = 0
    if i<N:
        for j in range(N-1):
            l += C[i+j+1]-C[i+j]
        if l<ans:
            ans = l
    else:
        for j in range(N-1):
            l += C[i-j]-C[i-j-1]
        if l<ans:
            ans = l
            
print(ans)
Problem p02793 (python)

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
import fractions
mod = 10**9+7
lcm = A[0]
for i in range(1,N):
    lcm = lcm*A[i]//fractions.gcd(lcm,A[i])
ans = 0
for i in range(N):
    ans += lcm*pow(A[i],mod-2,mod)
print(ans%mod)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
import fractions
def lcm(a):
    x = a[0]
    for i in range(1,len(a)):
        x = (x*a[i])//fractions.gcd(x,a[i])
        return x
A_lcm = lcm(A)
ans = 0
for i in A:
    ans += (A_lcm//i)%mod
print(ans%mod)

Buggy submission (verdict: Runtime Error):
import numpy as np
N = int(input())
A = np.array(list(map(int,input().split())))
mod = 10**9+7
lcm = np.lcm.reduce(A)
for i in A:
    ans += (lcm//i)%mod
print(ans%mod)
Problem p02833 (python)

Fixed submission:
N = int(input())
ans = 0
if N%2 == 1:
    print(0)
else:
    for i in range(1,len(str(N))+100):
        ans += N//(2*5**i)
    print(ans)

Buggy submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(10**18)

N = int(input())
memo={0:1,1:1,2:2}

def func(n):
    if n in memo:
        return memo[n]
    memo[n] = n*func(n-2)
    return memo[n]

f = list(str(func(N)))  
ans = 0

for i in range(1,len(f)):
    if f[-i]== "0":
        ans += 1
    else:
        break
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
memo={0:1,1:1,2:2}

def func(n):
    if n in memo:
        return memo[n]
    memo[n] = n*func(n-2)
    return memo[n]

f = list(str(func(N)))  
ans = 0

for i in range(1,len(f)):
    if f[-i]== "0":
        ans += 1
    else:
        break
print(ans)

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

def func(n):
    if n<2:
        return 1
    else:
        return n*func(n-2)

f = list(str(func(N)))  
ans = 0

for i in range(1,len(f)):
    if f[-i]== "0":
        ans += 1
    else:
        break
print(ans)
Problem p02879 (python)

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

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

Fixed submission:
N=int(input())
v = list(map(int,input().split()))
from heapq import heappop,heappush,heapify
heapify(v)
ans = heappop(v)
for i in range(N-1):
    ans = (ans+heappop(v))/2
print(ans)

Buggy submission (verdict: Runtime Error):
N=int(input())
v = list(map(int,inut().split()))
v.sort(reverse=True)
print(v[0]*v[1]//2)
Problem p03013 (python)

Fixed submission:
mod = 10**9+7
n,m = map(int,input().split())
a = set()
for i in range(m):
  a.add(int(input()))
dp = [0]*(n+1)
dp[0] = 1
for i in range(1,n+1) :
    dp[i] = (dp[i-1] + dp[i-2]) % mod
    if i in a :
        dp[i] = 0
print(dp[n])

Buggy submission (verdict: Runtime Error):
mod = 10**9+7
n,m = map(int,input().split())
a = set([int(input()) for _ in range(M)])
dp = [0]*(n+1)
dp[0] = 1
for i in range(1,n+1) :
    dp[i] = (dp[i-1] + dp[i-2]) % mod
    if i in a :
        dp[i] = 0

print(dp[n])

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
A = []
for i in range(M):
    A.append(int(input()))
mod = 1000000007
dp=[0]*(N+1)
dp[0]=1
if A[0]!=1:dp[1]=1 
else:dp[1]=0
    
for i in range(2,N+1):
    if i in A:
        dp[i]=0
    else:
        dp[i] = (dp[i-1]+dp[i-2])%mod

print(dp[-1])

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
A = [int(input()) for _ in range(M)]
mod = 1000000007
dp=[0]*(N+1)
dp[0]=1
if A[0]!=1:dp[1]=1 
else:dp[1]=0
    
for i in range(2,N+1):
    if i in A:
        dp[i]=0
    else:
        dp[i] = (dp[i-1]+dp[i-2])%mod

print(dp[-1])

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
A = [int(input()) for _ in range(M)]
mod = 1000000007
dp=[0]*(N+1)
dp[0]=1
if A[0]!=1:dp[1]=1 
else:dp[1]=0
    
for i in range(2,N+1):
    if i in A:
        dp[i]=0
    else:
        dp[i] = (dp[i-1]+dp[i-2])%mod

print(dp[N])

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
H = []
for i in range(M):
  H.append(int(input()))

dp = [0]*N # 初期条件
dp[0] = 1
dp[1] = 0 if 1 in H else 1
for i in range(2,N):
      if i in H:
        dp[i] = 0
      else:
        dp[i] = (dp[i-1]+dp[i-2])%1000000007

print(dp[N-1])
Problem p03127 (python)

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

from fractions import gcd
from functools import reduce

def gcd_list(numbers):
    return reduce(gcd, numbers)

print(gcd_list(A))

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

import math
from functools import reduce

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

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

print(gcd_list(A))

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

import math
from functools import reduce

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

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

print(gcd_list(A))

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

import math
from functools import reduce

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

print(gcd_list(A))
Problem p03329 (python)

Fixed submission:
N = int(input())

A = []
for i in range(20):
    if 6**i<=N:
        A.append(6**i)
for i in range(1,20):
    if 9**i<=N:
        A.append(9**i)
AA = sorted(A,reverse=True)
#print(AA)
        
INF = float("inf")
dp=[INF]*(N+1)
dp[0]=0

for i in range(N+1):
    for j in AA:
        if i>=j:
            dp[i]=min(dp[i-j]+1,dp[i])
        else:
            dp[i]=dp[i]
    
#print(dp)
print(dp[-1])

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

A = []
for i in range(20):
    if 6**i<=N:
        A.append(6**i)
for i in range(1,20):
    if 9**i<=N:
        A.append(9**i)
AA = sorted(A,reverse=True)
        
INF = float("inf")
dp=[INF]*(N)
dp[0]=1

for i in range(N):
    for j in AA:
        if i>=j:
        dp[i]=min(dp[i-j]+1,dp[i])
    
#print(dp)
print(dp[-1])
Problem p02596 (python)

Fixed submission:
K = int(input())
if (K % 5 == 0) | (K % 2 == 0):
  print(-1)

else:
  a = 7
  for i in range(K):
    if a % K == 0:
      print(i + 1)
      exit()
    a = (10 * a + 7) % K
  print(-1)

Buggy submission (verdict: Runtime Error):
N, D = (int(a) for a in input().split())
X2Y2 = [[int(a) ** 2 for a in input().split()] for b in range(N)]
X2, Y2 = [list(i) for i in zip(*X2Y2)]

c = 0
DD = D ** 2
for i in range(N):
    if X2[i] + Y2[i] <= DD:
        c += 1
print(c)
Problem p02571 (python)

Fixed submission:
#B - Substring 
S = str(input())
T = str(input())
i = 0
j = 0

Slen = len(S)
Tlen = len(T)
change_min = Tlen

for i in range(Slen - Tlen + 1):
    diff = 0
    for j in range(Tlen):
        if T[j] != S[i + j]:
            diff += 1
    change_min = min(change_min,diff)

# 出力
print(change_min)

Buggy submission (verdict: Runtime Error):
#B - Substring 
S = str(input())
T = str(input())
i = 0
j = 0

Slen = len(S)
Tlen = len(T)
change_min = Tlen

for i in range(Slen - Tlen):
    diff = 0
    for j in range(Tlen):
        if S[i] != T[i + j]:
            diff += 1
    change_min = min(change_min,diff)

# 出力
print(change_min)

Buggy submission (verdict: Runtime Error):
#B - Substring 
S = str(input())
T = str(input())
i = 0
j = 0

k = len(S)
l = len(T)
change_min = l

for i in range(l):
    for m in range(l - i) :
        change = l
        for j in range(k - (l -i)+1):
            print(S[j+m:j +l-i],T[m:l-i],change,l-i-m)
            if S[j+m:j +l-i] == T[m:l-i]:
                print('Match !!')
                change -= l-i-m
        if change_min > change:
            change_min = change
# 出力
print(change_min)
Problem p02596 (python)

Fixed submission:
#C_Repsept
K = int(input())
if K % 7 == 0 :
    L = int( 9 * K / 7 )
else:
    L = 9 * K
X = 0
kekka = 1
total = -1
if L % 2 == 1:
    if L % 5 != 0:
        for i in range(L): 
            kekka = kekka * 10 % L
            if kekka == 1:
                total = i+1
                break
# 出力
print(total)

Buggy submission (verdict: Runtime Error):
#C_Repsept
import math
K = int(input())
if K % 7 == 0 :
    L = 9 * K / 7
else:
    L = 9 * K
X = 0
kekka = 1
total = -1
if L % 2 == 1:
    if L % 5 != 0:
        for i in range(L): 
 #           X = pow(10,i) % L
            kekka = kekka * 10 % L
            if kekka == 1:
                total = i+1
                break
# 出力
print(total)
Problem p02729 (python)

Fixed submission:
def resolve():
    import itertools
    N,M = map(int,input().split())
    N_list = [int(x) for x in range(N)]
    M_list = [int(y) for y in range(M)]

    n = len(list(itertools.combinations(N_list,2)))
    m = len(list(itertools.combinations(M_list,2)))
    print(n+m)

resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    import itertools
    N,M = map(int,input().split())
    N_list = [int(x) for x in range(N)]
    M_list = [int(y) for y in range(M)]

    n = len(list(itertools.combinations(N_list,2)))
    m = len(list(itertools.combinations(M_list,2)))
    print(n+m)

if __name__ == "__main__":
    main()
Problem p03042 (python)

Fixed submission:
String=input()
String=list(String)
String=[(String[i:i+2]) for i in range(0, len(String),2)]
String[0]="".join(String[0])
String[1]="".join(String[1])
String[0]=int(String[0])
String[1]=int(String[1])
if(String[0]>0 and String[0]<=12and String[1]>0 and String[1]<=12):
    print("AMBIGUOUS")
elif(String[0]==String[1]==0 or String[0]>12 and String[0]!=0 and String[1]>12 and String[1]!=0):
    print("NA")
elif(String[1]>0 and String[1]<13):
    print("YYMM")
elif(String[0]>0 and String[0]<13):
    print("MMYY")
elif(String[0]==0 and String[1]>12):
    print("NA")
else:
    print("NA")

Buggy submission (verdict: Runtime Error):
String=input()
String=list(String)
String=[(String[i:i+2]) for i in range(0, len(String),2)]
String[0]="".join(String[0])
String[1]="".join(String[1])
String[0]=int(String[0])
String[1]=int(String[1])
if(String[0]>=0 and String[0]<=12and String[1]>0 and String[1]<=12):
    print("AMBIGUOUS")
elif(String[0]==String[1]==0 or String[0]>12 and String[0]!=0 and String[1]>12 and String[1]!=0):
    print("NA")
elif(String[1]>0 and String[1]<13):
    print("YYMM")
elif(String[0]>0 and String[0]<13):
    print("MMYY")
elif(String[0]==0 and String[1]>12):
    print("NA")
else:
    print("NA")
Problem p02570 (python)

Fixed submission:
x, y,z = map(int, input().split()) 
test = x / z

if (test <= y):
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
x, y,z = map(int, input().split()) 
test = x / z

if (test < y){
    print('Yes')
}else{
    print('No')
}
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()))
res = 0
for i in range(n - 1):
    res += B[i]
    if A[i] + 1 == A[i + 1]:
        res += C[A[i] - 1]
print(res + B[-1])

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()))
res = 0
for i in range(N - 1):
    res += B[i]
    if A[i] + 1 == A[i + 1]:
		res += C[A[i] - 1]
print(res)
Problem p02595 (python)

Fixed submission:
count = 0
x = 0
y = 0
n,d = map(int,input().split())
for i in range(n):
  x,y = map(int,input().split())
  if (x**2+y**2 )** 0.5 <= d:
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
import math
count = 0
n,d = map(int,input().split())
for i in range(n):
  x,y = map(int,input().split())
  if x**2+y**2 ** 0.5 <= d:
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
import math
count = 0
n,d = map(int,input().split())
for i in range(n):
  x,y = map(int,input().split())
  if x**2+y**2 ** 0.5 <= d:
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
import math
count = 0
n,d = map(int,input().split())
for i in range(n):
  x,y = map(int,input().split())
  if sqrt(x**2+y**2) >= d:
    count += 1
print(count)
Problem p02753 (python)

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

Buggy submission (verdict: Runtime Error):
S = input()
if s[0] == S[1] and S[1] == S[2]:
  print("No")
else:
  print("Yes")

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

if situation == AAA or situation == BBB:
  print(No)
else:
  print(Yes)

Buggy submission (verdict: Runtime Error):
if AAA or BBB:
  print(No)
else:
  print(Yes)
Problem p02836 (python)

Fixed submission:
s = input()
r = s[::-1]
count = 0

for i in range(int(len(s))):
    if (s[i] != r[i]):
        count += 1

print(count//2)

Buggy submission (verdict: Runtime Error):
S = input()
a = len(S)//2 + 1
A = S[:a-1]
reS=S[::-1]
B = reS[:a-1]
ans = 0
for i in range(a):
    if A[i] != B[i]:
        ans += 1
print(ans)
Problem p02847 (python)

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

Buggy submission (verdict: Runtime Error):
S = input()
if S == "SAT":
    print(1)
elif S == "FRI":
    print(2)
elif S == "THU":
    print(3)
elif S =="WED":
    print(4)
elif S == "TUE":
    print(5)
elif S == "MON":
    print(6)
elif S = "SUN":
    print(7)
Problem p02570 (python)

Fixed submission:
d,t,s=map(int,input().split())
if(d/s>t):
	print("No")
else:
	print("Yes")

Buggy submission (verdict: Runtime Error):
s=input()
a=len(s)
t=input()
b=len(t)
maxcnt=0
for i in range(a-b+1):
	count=0
	for j in range(b):
		s1=s[i+j]
		s2=t[j]
		if(s1==s2):
			count+=1
	if(maxcnt<count):
		maxcnt=count	
print(b-maxcnt)
Problem p02570 (python)

Fixed submission:
x,y,z = input().split()
if ( int(x) / int(y) <= int(z)):
	print("Yes")
else:
	print("No")

Buggy submission (verdict: Runtime Error):
 D,T,S = map(int, input().split())
if (D/T > S):
  	print("No")
else:
	print("Yes")

Buggy submission (verdict: Runtime Error):
D,T,S = map(int(), input().split())
if (D/T < S):
  	print("No")
else
	print("Yes")

Buggy submission (verdict: Runtime Error):
x,y,z = input.split()
if (x/y >= z):
	print("Yes")
elif
	print("No")

Buggy submission (verdict: Runtime Error):
x,y,z = input.split()
if (x/y <= z)
	print("Yes")
elif
	print("No")

Buggy submission (verdict: Runtime Error):
x,y,z = input.split()
if (x/y >= z)
	print("Yes")
elif
	print("No")
Problem p02699 (python)

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

Buggy submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split())
taka=c/b
ao=a/d
taka=taka if taka==c//b else int(taka)+1
ao=ao if ao==a//d else int(ao)+1
print("Yes" if taka<=ao else "No")