qyliang/CodeNanoFix huggingface dataset:
Buggy code:
import math
n, d = map(int, input().split())
ans = 0
for _ in range(n):
  x, y = map(int, input().split())
  a = x**2 + y **2
  d = d**2
  if a <= d:
    ans+=1
print(ans)

Fixed code:
import math
n, d = map(int, input().split())
ans = 0
for _ in range(n):
  x, y = map(int, input().split())
  if x**2+y**2 <= d*d:
    ans+=1
print(ans)
Buggy code:
import math

n, d = list(map(int, input().split()))
count = 0

for i in range(n):
  x, y = list(map(int, input().split()))
  if x >= d or y >= d:
    pass
  else:
    if math.sqrt(x*x + y*y) <= d:
      count += 1

print(count)

Fixed code:
import math

n, d = list(map(int, input().split()))
count = 0

for i in range(n):
  x, y = list(map(int, input().split()))
  if abs(x) > d or abs(y) > d:
    pass
  else:
    if math.sqrt(x*x + y*y) <= d:
      count += 1

print(count)
Buggy code:
n, d = map(int, input().split())
xy = []
for i in range(n):
  xy.append(list(map(int,input().split())))

c = 0

for i in range(n):
  if xy[i][0] * xy[i][0] + xy[i][1] * xy[i][1] < d * d:
    c += 1

print(c)


Fixed code:
n, d = map(int, input().split())
xy = []
for i in range(n):
  xy.append(list(map(int,input().split())))

c = 0

for i in range(n):
  if xy[i][0] * xy[i][0] + xy[i][1] * xy[i][1] <= d * d:
    c += 1

print(c)
Buggy code:
def main():
    d, n = map(int, input().split())
    counter = 0
    for _ in range(n):
        x, y = map(int, input().split())
        if x**2 + y**2 <= d:
            counter += 1
    return print(str(counter))

main()

Fixed code:
def main():
    n, d = map(int, input().split())
    counter = 0
    for _ in range(n):
        x, y = map(int, input().split())
        if x**2 + y**2 <= d**2:
            counter += 1
    return print(counter)
 
main()
Buggy code:
n,d=list(map(int,input().split()))
cnt=0
for i in range(n):
  x,y=list(map(int,input().split()))
  if (x**2+y**2)==d**2:
    cnt+=1
print(cnt)
  

Fixed code:
n,d = map(int, input().split())
cnt = 0
for i in range(n):
  x,y = map(int, input().split())
  if x**2+y**2 <= d**2:
    cnt+=1
print(cnt)
Buggy code:
import math
count=0
n,d=map(int,input().split())
for _ in range(n):
  x,y=map(int,input().split())
  if x**2+y**2<=25:
    count+=1
print(count)

Fixed code:
import math
count=0
n,d=map(int,input().split())
for _ in range(n):
  x,y=map(int,input().split())
  if x**2+y**2<=d**2:
    count+=1
print(count)
Buggy code:
N,D = map(int,input().split())
point = [list(map(int, input().split())) for x in range(N)]
count = 0
for i in range(n):
    if D >= (point[i][0]**2+point[i][1]**2)**0.5:
        count += 1
print(count)

Fixed code:
N,D = map(int,input().split())
point = [list(map(int, input().split())) for x in range(N)]
count = 0
for i in range(N):
    if D >= (point[i][0]**2+point[i][1]**2)**0.5:
        count += 1
print(count)
Buggy code:
st = input().split()
n = int(st[0])
d = int(st[1])

c = 0

for i in ramge(n):
    middle = input().split()
    x = int(start[0])
    y = int(start[1])
    if x**2 + y**2 <= d**2:
        c+=0

print(c)
        
        
    


Fixed code:
st = input().split()
n = int(st[0])
d = int(st[1])

c = 0

for i in range(n):
    middle = input().split()
    x = int(middle[0])
    y = int(middle[1])
    if x**2 + y**2 <= d**2:
        c+=1

print(c)
Buggy code:
import math

N,D= list(map(int,input().split()))
x = [0] * N
y = [0] * N
b=0

for i in range(N):
     x[i], y[i] = map(int, input().split())
      a=x[i]**2+y[i]**2
      if math.sqrt(a) <=D:
          b+=1
print(b)


Fixed code:
import math

N,D= list(map(int,input().split()))
x = [0] * N
y = [0] * N
b=0

for i in range(N):
     x[i], y[i] = map(int, input().split())
     #print(x[i])
     a=x[i]**2+y[i]**2
     #print(math.sqrt(a))
     if math.sqrt(a) <=D:
          b+=1
print(b)
Buggy code:
import math
n,d = map(int,input().split())
r = 0
d_ = d**2
for i in n:
  a,b = map(int,input().split())
  if d_ >= a**2 + b**2:
    r += 1
print(r)

Fixed code:
import math
n,d = map(int,input().split())
r = 0
d_ = d**2
for i in range(n):
  a,b = map(int,input().split())
  if d_ >= a**2 + b**2:
    r += 1
print(r)
Buggy code:
count=0
N,D=map(int,input().split())
for i in range(N):
    X,Y=map(int,input().split())
    if D**2>X**2+Y**2:
        count+=1
print(count)

Fixed code:
count=0
N,D=map(int,input().split())
for i in range(N):
    X,Y=map(int,input().split())
    if D**2>=X**2+Y**2:
        count+=1
print(count)
Buggy code:
n = list(map(int, input().split()))[0]
d = list(map(int, input().split()))[1]

xy = [map(int, input().split()) for _ in range(n)]
x, y = [list(i) for i in zip(*xy)]

count = 0

for i in range(n):
    if x[i]*x[i] + y[i]*y[i] <= d*d:
        count += 1
print(count)

Fixed code:
c = list(map(int, input().split()))
n, d = c[0], c[1]

xy = [map(int, input().split()) for _ in range(n)]
x, y = [list(i) for i in zip(*xy)]

count = 0

for l in range(n):
    a = x[l]*x[l] + y[l]*y[l]
    if a <= d*d:
        count += 1
print(count)
Buggy code:
import math

DISTANCE_NUM=0

N,D=(int(x) for x in input.split())

for _ in range(N)
  x,y=(int(x) for in input.split())
  distance=math.sqrt(x**2+y**2)
  
  if distance <= D:
    DISTANCE_NUM+=1
    
print(DISTANCE_NUM)

Fixed code:
import math
 
DISTANCE_NUM=0
 
N,D=map(int,input().split())
 
for _ in range(N):
  x,y=map(int,input().split())
  distance=math.sqrt(x**2+y**2)
  
  if distance <= D:
    DISTANCE_NUM+=1
    
print(DISTANCE_NUM)
Buggy code:
import math
n,d=map(int,input().split())
count=0
for i in range(n):
  x,y=map(int,input().split())
  p=math.ceil(math.pow(x,2)+math.pow(y,2))
  r=math.ceil(math.sqrt(p))
  if(r==d):
    count+=1
print(count)

Fixed code:
import math
n,d=map(int,input().split())
count=0
for i in range(n):
  x,y=map(int,input().split())
  p=math.ceil(math.pow(x,2)+math.pow(y,2))
  r=math.ceil(math.sqrt(p))
  if(r<=d):
    count+=1
print(count)
Buggy code:
import math
n,d = map(int,input().split())
c = 0

for i in range (n):
  a,b = map(int,input().split())
  if math.sqrt(a**2 +b **2) >=d:
    c+=1

print(c)


Fixed code:
import math
n,d = map(int,input().split())
c = 0

for i in range (n):
  a,b = map(int,input().split())
  if math.sqrt(a*a +b*b) <=d:
    c+=1

print(c)
Buggy code:
N, D = map(int, input().split())
X, Y = [map(int, input().split()) for i in range(N)]

cnt = 0
for i in range(N):
    if X[i]**2 + Y[i]**2 < D**2:
        cnt += 1
print(cnt)

Fixed code:
N, D = map(int, input().split())

cnt = 0
for i in range(N):
    X, Y = map(int, input().split())
    if X**2 + Y**2 <= D**2:
        cnt += 1
print(cnt)
Buggy code:
n, d = map(int, input().split())
ans = 0
for i in range(n):
    x, y = map(int, input().split())
    if x * x + y * y < d * d:
        ans += 1
print(ans)

Fixed code:
n, d = map(int, input().split())
ans = 0
for i in range(n):
    x, y = map(int, input().split())
    if x * x + y * y <= d * d:
        ans += 1
print(ans)
Buggy code:
import math

n, d = map(int, input().split())
cnt = 0
for i in range(n):
    x, y = map(int, input().split())
    dist = math.sqrt((x * x) + (y * y))
    print(dist)
    if dist <= d:
        cnt += 1
print(cnt)


Fixed code:
import math

n, d = map(int, input().split())
cnt = 0
for i in range(n):
    x, y = map(int, input().split())
    dist = math.sqrt((x * x) + (y * y))
    if dist <= d:
        cnt += 1
print(cnt)
Buggy code:
import math

input_ = input().split()

N = int(input_[0])
D = float(input_[1])

num = 0

for i in range(N):
  x_i,y_i = map(float,input().split())
  
  if(math.sqrt(x_i**2 + y_i**2p) <= D):
    num += 1
    
print(num)
  
  

Fixed code:
import math

input_ = input().split()

N = int(input_[0])
D = float(input_[1])

num = 0

for i in range(N):
  x_i,y_i = map(float,input().split())
  
  if(math.sqrt(x_i**2 + y_i**2) <= D):
    num += 1
    
print(num)
Buggy code:
N, D = map(int, input().split())
i = 0
count = 0
while (i < N):
    p, q = map(int, input().split())
    d = math.sqrt(p*p + q*q)
    if (d <= D):
        count+= 1
    i+= 1
print(i)

Fixed code:
import math
N, D = map(int, input().split())
i = 0
count = 0
while (i < N):
    p, q = map(int, input().split())
    d = math.sqrt(p*p + q*q)
    if (d <= D):
        count+= 1
    i+= 1
print(count)
Buggy code:
N,D=list(map(int,input().split()))
count=0
for i in range(N):
  x,y=list(map(int,input().split()))
  if((x**2 + y**2)<=D):
    count+=1
print(count)


Fixed code:
N,D=list(map(int,input().split()))
count=0
for i in range(N):
  x,y=list(map(int,input().split()))
  if((x**2 + y**2)<=D**2):
    count+=1
print(count)
Buggy code:
n, d = map(int, input().split())
cnt = 0
for _ in range(n):
  x, y = map(int, input().split())
  if (x * x + y * y <= d):
    cnt = cnt + 1
print(cnt)

Fixed code:
n, d = map(int, input().split())
cnt = 0
for _ in range(n):
  x, y = map(int, input().split())
  if (x * x + y * y <= d * d):
    cnt = cnt + 1
print(cnt)
Buggy code:
N, D = map(int, input().split())
count = 0
print(D)
print(index)
for i in range(N):
    a, b = map(int, input().split())
    if (a**2 + b**2) <= D**2:
        count += 1
print(count)


Fixed code:
N, D = map(int, input().split())
count = 0
for i in range(N):
    a, b = map(int, input().split())
    if (a**2 + b**2) <= D**2:
        count += 1
print(count)
Buggy code:
import math
n,d = map(int,input().split())
ans = 0
for i in range(n):
    x,y = map(int,input().split())
    if math.sqrt((x ** 2) + (y ** 2)) >= d:
        ans += 1
print(ans)

Fixed code:
import math

n, d = map(int, input().split())
ans = 0
for i in range(n):
    x, y = map(int, input().split())
    if math.sqrt(x**2 + y**2) <= d:
        ans += 1

print(ans)
Buggy code:
import math 

nd = input().split()
nd = [int(x) for x in nd]
n=nd[0]
d=nd[1]

x_list =[]
y_list =[]

n = 4
d = 5

x_list =[0,-2,3,4]
y_list =[5,4,4,-4]



def count(x_list,y_list,d,n):
    cnt =0
    for i in range(n):
        # print(math.sqrt(x_list[i]**2 +y_list[i]**2),d)
        if math.sqrt(x_list[i]**2 +y_list[i]**2) <=d:
            cnt +=1
        
    return cnt


for i in range(n):
    xy = input().split()
    xy = [int(k) for k in xy]
    x_list.append(xy[0])
    y_list.append(xy[1])

print(count(x_list,y_list,d,n))

Fixed code:
import math 

nd = input().split()
nd = [int(x) for x in nd]
n=nd[0]
d=nd[1]

x_list =[]
y_list =[]

# n = 4
# d = 5

# x_list =[0,-2,3,4]
# y_list =[5,4,4,-4]



def count(x_list,y_list,d,n):
    cnt =0
    for i in range(n):
        # print(math.sqrt(x_list[i]**2 +y_list[i]**2),d)
        if math.sqrt(x_list[i]**2 +y_list[i]**2) <=d:
            cnt +=1
        
    return cnt


for i in range(n):
    xy = input().split()
    xy = [int(k) for k in xy]
    x_list.append(xy[0])
    y_list.append(xy[1])

print(count(x_list,y_list,d,n))
Buggy code:
import math
n,d = map(int,input().split())
ans = 0
for i in range(n):
    x,y = map(int,input().split())
    print(math.sqrt((x ** 2) + (y ** 2)))
    if math.sqrt((x ** 2) + (y ** 2)) <= d:
        ans += 1
print(ans)

Fixed code:
import math

n,d=map(float,input().split())
n=int(n)
m=0
for i in range(n):
  x,y=map(int,input().split())
  if math.sqrt(x**2+y**2) <= d:
    m+=1
print(m)
Buggy code:
import math

n, d = map(int, input().split())
m = 0
for _ in range(n):
  a, b = map(int, input().split())
  a = a * a
  b = b * b
  if(d <= math.sqrt(a + b)):
    m += 1

print(m)

Fixed code:
import math
 
n, d = map(int, input().split())
m = 0
for _ in range(n):
  a, b = map(int, input().split())
  a = a * a
  b = b * b
  if(d >= math.sqrt(a + b)):
    m += 1
 
print(m)
Buggy code:
import math 
N,D=map(int,input().split())
c = 0
for i in range(N):
  X,Y=map(int,input().split())
  if X <= D and Y<=D
    d = math.sqrt(X**2+Y**2)
    if d <= D:
      c = c+1
print(c) 

Fixed code:
import math 
N,D=map(int,input().split())
c = 0
for i in range(N):
  X,Y=map(int,input().split())
  if X <= D and Y<=D:
    d = math.sqrt(X**2+Y**2)
    if d <= D:
      c = c+1
print(c)
Buggy code:
n,d = map(int,input().split())
from math import sqrt
count = 0
for _ in range(n):
  x,y = map(int,input().split())
  m = sqrt(x**2 + y**2)
  if m <= d:
    count += 1
print(ccount)

Fixed code:
n,d = map(int,input().split())
from math import sqrt
count = 0
for i in range(n):
    x,y = map(int,input().split())
    m = sqrt(x**2 + y**2)
    if m <= d:
        count += 1
print(count)
Buggy code:
N, D = map(int, input().split())
total = 0

for i in range(N):
    x, y = map(int, input().split())
    d = (x**2 + y**2)**.5
    if d >= D:
        total += 1

print(total)

Fixed code:
N, D = map(int, input().split())
total = 0

for i in range(N):
    x, y = map(int, input().split())
    d = (x**2 + y**2)**.5
    if d <= D:
        total += 1

print(total)
Buggy code:
n, d = map(int, input().split())
xy = 0
for i in range(n):
  a, b = map(int, input().split())
  xy += xi**2 + yi**2 <= d**2 for xi, yi in xy

print(xy)

Fixed code:
n, d = map(int, input().split())
xy = 0
for i in range(n):
  xi, yi = map(int, input().split())
  xy += xi**2 + yi**2 <= d**2
 
print(xy)
Buggy code:
n, d = map(int, input().split())
xy = []
for i in range(n):
  a, b = map(int, input().split())
  x.append([a, b])
 
count = 0
for xi, yi in xy:
  count += xi**2 + yi**2 <= d**2
 
print(count)

Fixed code:
n, d = map(int, input().split())
xy = []
for i in range(n):
  a, b = map(int, input().split())
  xy.append([a, b])
 
count = 0
for xi, yi in xy:
  count += xi**2 + yi**2 <= d**2
 
print(count)
Buggy code:
N, D = map(int,input().split())

for i in range(N):
    X, Y = map(int, input().split())
    A = ((X**2 + Y**2)**0.5)
    if A <= D:
        Z = Z + 1
print(Z)



Fixed code:
N, D = map(int,input().split())
Z = 0
for i in range(N):
    X, Y = map(int, input().split())
    A = ((X**2 + Y**2)**0.5)
    if A <= D:
        Z = Z + 1
print(Z)
Buggy code:
n, d = map(int, input().split())
count = 0
for i in range(n):
  x, y = map(int, input().split())
  if pow((pow(x, 2) + pow(y, 2)), 0.5) >= d:
    count += 1
print(count)

Fixed code:
n, d = map(int, input().split())
count = 0
for i in range(n):
  x, y = map(int, input().split())
  if pow((pow(x, 2) + pow(y, 2)), 0.5) <= d:
    count += 1
print(count)
Buggy code:
ma = lambda :map(int,input().split())
ni = lambda:int(input())
yn = lambda fl:print("Yes") if fl else print("No")
import collections
import math
import itertools
import heapq as hq
n,d = ma()
cnt=0
for i in range(n):
    p,q = ma()
    if p**2 + q**2 <=D**2:
        cnt+=1
print(cnt)


Fixed code:
ma = lambda :map(int,input().split())
ni = lambda:int(input())
yn = lambda fl:print("Yes") if fl else print("No")
import collections
import math
import itertools
import heapq as hq
n,d = ma()
cnt=0
for i in range(n):
    p,q = ma()
    if p**2 + q**2 <=d**2:
        cnt+=1
print(cnt)
Buggy code:
import math
n,d=input().split(" ")
n=int(n)
d=int(d)
cnt=0
for i in range(0,n):
    x,y=input().split(" ")
    x=int(x)
    y=int(y)
    dist=math.sqrt(x*x + y*y)
    if(dist>=d):
        cnt=cnt+1
print(cnt)

Fixed code:
import math
n,d=input().split(" ")
n=int(n)
d=int(d)
cnt=0
for i in range(0,n):
    x,y=input().split(" ")
    x=int(x)
    y=int(y)
    dist=math.sqrt(x*x + y*y)
    if(dist<=d):
        cnt=cnt+1
print(cnt)
Buggy code:
N,M=list(map(int,input().split()))
ans=0
for u in range(N):
  a,b=map(int,input().split())
  S=a*a+b*b
  if M*M<=S:
    ans+=1
print(ans)

Fixed code:
N,M=list(map(int,input().split()))
ans=0
for u in range(N):
  a,b=map(int,input().split())
  S=a*a+b*b
  if M*M>=S:
    ans+=1
print(ans)
Buggy code:
N,D = map(int,input().split())
a = 0
for num in N :
  X,Y = map(int,input().split())
  if X*X + Y*Y <= D*D :
    a = 1
print(a)

Fixed code:
N,D = map(int,input().split())
a = 0
for num in range(1,N+1) :
  X,Y = map(int,input().split())
  if X*X + Y*Y <= D*D :
    a += 1
print(a)
Buggy code:
n,d = map(int,input().split())
i=0
num_list=[]
for k in range(n):
  num_list.append(list(map(int,input().split())))
for j in range(n):
  if num_list[j][0]**2 + num_list[j][1]**2 <= 5:
    i = i + 1
print(i)

Fixed code:
n,d = map(int,input().split())
i=0
num_list=[]
for k in range(n):
  num_list.append(list(map(int,input().split())))
for j in range(n):
  if num_list[j][0]**2 + num_list[j][1]**2 <= d**2:
    i = i + 1
print(i)
Buggy code:
N, D = map(int,input().split())
data = [list(map(int,input().split())) for _ in range(N)]
#print(data)
count = 0
for d in data:
    if d[0]*d[0] + d[1]*d[1] >= D*D:
        count += 1
print(count)
#print(N,D)

Fixed code:
N, D = map(int,input().split())
data = [list(map(int,input().split())) for _ in range(N)]
#print(data)
count = 0
for d in data:
    if d[0]*d[0] + d[1]*d[1] <= D*D:
        count += 1
print(count)
#print(N,D)
Buggy code:

a,b = input().split()
a = int(a)
b = int(b)
xy = [map(int, input().split()) for _ in range(a)]
x, y = [list(i) for i in zip(*xy)]

ans = 0

for i in range(a):
    if (x[i]**2 + y[i]**2)**0.5 >= b:
        ans +=1
    else:
        continue
print(ans)

Fixed code:

a,b = input().split()
a = int(a)
b = int(b)
xy = [map(int, input().split()) for _ in range(a)]
x, y = [list(i) for i in zip(*xy)]

ans = 0

for i in range(a):
    if (x[i]**2 + y[i]**2)**0.5 <= b:
        ans +=1
    else:
        continue
print(ans)
Buggy code:
n, d = map(int, input().split())
ans = 0
for i in range(n):
    x, y = map(int, input().split())
    if sqrt(x**2 + y**2) <= d:
        ans += 1
print(ans)

Fixed code:
from math import sqrt
n, d = map(int, input().split())
ans = 0
for i in range(n):
    x, y = map(int, input().split())
    if sqrt(x**2 + y**2) <= d:
        ans += 1
print(ans)
Buggy code:
N, D=map(int, input().split())

ans=0

for i in range(N):
  x,y=map(int, input().split())

  if x**2 +y**2 <=D**2:
    ans +=1

Fixed code:
N, D=map(int, input().split())

ans=0

for i in range(N):
  x,y=map(int, input().split())

  if x**2 +y**2 <=D**2:
    ans +=1
print(ans)
Buggy code:
x,y=map(int,input().split())

res=0

for n in range(x):
    a,b=map(int,input().split())
    d=(a*a +b*b)**.5
    if d>=y:res+=1

print(res)

Fixed code:
x,y=map(int,input().split())

res=0

for n in range(x):
    a,b=map(int,input().split())
    d=(a*a +b*b)**.5
    if d<=y:res+=1

print(res)
Buggy code:
import math

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

count = 0

for i in range(n):
  x, y = map(int, input().split())
  if math.sqrt(x**2 + y**2) <= d:
    count += 1
  else:
    break

print(count)

Fixed code:
import math

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

count = 0

for i in range(n):
  x, y = map(int, input().split())
  if math.sqrt((x)**2 + (y)**2) <= d:
    count += 1

print(count)
Buggy code:
N, D = list(map(int, input()))

cnt = 0

for i in range(N):
  x, y = list(map(int, input()))
  
  if x**2 + y**2 <= D**2:
    cnt += 1

print(cnt)

Fixed code:
N, D = list(map(int, input().split()))
 
cnt = 0
 
for i in range(N):
  x, y = list(map(int, input().split()))
  
  if x**2 + y**2 <= D**2:
    cnt += 1
 
print(cnt)
Buggy code:
n = list(map(int, input().split()))
distance = n[1]
points = [list(map(int, input().split())) for i in range(n[0])]
ans = 0
for i in points:
    x = i[0]
    y = i[1]
    d = math.sqrt(x**2 + y**2)
    if d <= distance:
        ans += 1
print(ans)

Fixed code:
import math
n = list(map(int, input().split()))
distance = n[1]
points = [list(map(int, input().split())) for i in range(n[0])]
ans = 0
for i in points:
    x = i[0]
    y = i[1]
    d = math.sqrt(x**2 + y**2)
    if d <= distance:
        ans += 1
print(ans)
Buggy code:
from collections import Counter
import copy
from itertools import combinations


def A(x):
  return 'Yes' if x >= 30 else 'No'


def B(N, D, X, Y):
  ans = 0
  for i in range(N):
    Di = X[i]**2 + Y[i]**2
    if Di < D**2:
      ans += 1
  return ans


def main():
  N, D = map(int, input().split())
  X = []
  Y = []
  for i in range(N):
    Xi, Yi = map(int, input().split())
    X.append(Xi)
    Y.append(Yi)
  print(B(N, D, X, Y))


if __name__ == '__main__':
  main()


Fixed code:
from collections import Counter
import copy
from itertools import combinations


def A(x):
  return 'Yes' if x >= 30 else 'No'


def B(N, D, X, Y):
  ans = 0
  for i in range(N):
    Di = X[i]**2 + Y[i]**2
    if Di <= D**2:
      ans += 1
  return ans


def main():
  N, D = map(int, input().split())
  X = []
  Y = []
  for i in range(N):
    Xi, Yi = map(int, input().split())
    X.append(Xi)
    Y.append(Yi)
  print(B(N, D, X, Y))


if __name__ == '__main__':
  main()
Buggy code:
import math
N, D = map(int, input().split())
xy = [map(int, input().split()) for _ in range(N)]
x, y = [list(i) for i in zip(*xy)]

ans = 0

def aa(x,y):
    z = abs(x)**2 + abs(y)**2
    a = math.sqrt(z)
    return a

for k in range(N):
    b = aa(x[k],y[k])
    if b >= D:
        ans += 1

print(ans)

Fixed code:
import math
N, D = map(int, input().split())
xy = [map(int, input().split()) for _ in range(N)]
x, y = [list(i) for i in zip(*xy)]

ans = 0

def aa(x,y):
    z = abs(x)**2 + abs(y)**2
    a = math.sqrt(z)
    return a

for k in range(N):
    b = aa(x[k],y[k])
    if b <= D:
        ans += 1

print(ans)
Buggy code:
n, d = list(map(int, split().input()))n, d = list(map(int, input().split()))
count = 0
for i in range(n):
  x, y = list(map(int, input().split()))
  p = x **2 + y **2
  if p <= d**2:
    count += 1
    
print(count)

Fixed code:
n, d = list(map(int, input().split()))
count = 0
for i in range(n):
  x, y = list(map(int, input().split()))
  p = x **2 + y **2
  if p <= d**2:
    count += 1
    
print(count)
Buggy code:
n, d = [int(i) for i in input().split()]
res = 0
d = d**2
for _ in range(n):
  x, y = [int(i) for i in input().split()]
  if x**2 + y**2 >= d:
    res += 1
print(res)

Fixed code:
n, d = [int(i) for i in input().split()]
res = 0
d = d**2
for _ in range(n):
  x, y = [int(i) for i in input().split()]

  if x**2 + y**2 <= d:
    res += 1
print(res)
Buggy code:
N, D = list(map(int, input().split()))
 
count = 0
for _ in range(N):
    X, Y = list(map(int, input().split()))
    if (X * X + Y * Y) ** 2 <= D ** 2 :
        count += 1
print(count)

Fixed code:
N, D = list(map(int, input().split()))
 
count = 0
for _ in range(N):
    X, Y = list(map(int, input().split()))
    if X * X + Y * Y <= D ** 2 :
        count += 1
print(count)
Buggy code:
N = int(input().split()[0])
D = int(input().split()[1])
count = 0
for i in range(N):
  Xi = int(input().split()[0])
  Yi = int(input().split()[1])
  R = (Xi**2+Yi**2)**(1/2)
  if R<=D:
    count += 1
print(count)

Fixed code:
ND = input()
N = int(ND.split()[0])
D = int(ND.split()[1])
count = 0
for i in range(N):
  XiYi = input()
  Xi = int(XiYi.split()[0])
  Yi = int(XiYi.split()[1])
  R = (Xi**2+Yi**2)**(1/2)
  if R <= D:
    count += 1
print(count)
Buggy code:
N, D = map(int, input().split())
count = 0

for i in range(N):
  x, y = map(int, input().split())
  d = sqrt(x**2 + y**2)
  
  if d<=D:
    count += 1
    
print(count)

Fixed code:
import math

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

for i in range(N):
  x, y = map(int, input().split())
  d = math.sqrt(x**2 + y**2)
  
  if d<=D:
    count += 1
    
print(count)
Buggy code:
import math
n, d = input().split()
points = []
for i in range(n):
  points.append([int(x) for x in input().split()])
print(len([p for p in points if math.sqrt(p[0]**2+p[1]**2) <= d]))

Fixed code:
import math
n, d = [int(i) for i in input().split()]
points = []
for i in range(n):
  points.append([int(x) for x in input().split()])
print(len([p for p in points if math.sqrt(p[0]**2+p[1]**2) <= d]))
Buggy code:
n,d=map(int,input())
cnt=0
for i in range(n):
  x,y =map(int,input())
  if x**2+y**2 <= d**2:
    cnt+=1
print(cnt)

Fixed code:
n,d=map(int,input().split())
cnt=0
for i in range(n):
  x,y =map(int,input().split())
  if x**2+y**2 <= d**2:
    cnt+=1
print(cnt)
Buggy code:
N,D=map(int,input().split())
X=[]
Y=[]
count=0
for i in range(N):
    Xi,Yi=map(int,input().split())
    X.append(Xi)
    Y.append(Yi)

for ll in range(N):
    if (X**2+Y**2<=D):
        count +=1

print(count)

Fixed code:
N,D=map(int,input().split())
X=[]
Y=[]
count=0
for i in range(N):
    Xi,Yi=map(int,input().split())
    X.append(Xi)
    Y.append(Yi)

for ll in range(N):
    if (X[ll]**2+Y[ll]**2<=D**2):
        count +=1

print(count)