qyliang/CodeNanoFix huggingface dataset:
Buggy code:
import math

i = input().split()
n = int(i[1])
D = int(i[0])
num_list = []
count = 0
for i in range(n):
	num_list.append(list(map(int,input().split())))

for j in num_list:
    x = j[0]
    y = j[1]
    dist = math.sqrt(x ** 2 + y ** 2)
    if dist <= D:
        count += 1

print(count)

Fixed code:
import math
 
i = input().split()
n = int(i[0])
D = int(i[1])
num_list = []
count = 0
for i in range(n):
	num_list.append(list(map(int,input().split())))
 
for j in num_list:
    x = j[0]
    y = j[1]
    dist = math.sqrt(x ** 2 + y ** 2)
    if dist <= D:
        count += 1
 
print(count)
Buggy code:
N, D  = [int(i) for i in input().split()]
X = int(0)
Y = int(0)
B = int(0)
Z = int(0)
for i in range(N):
  A = []
  A = [int(N) for N in input().split()]
  X = A[0]
  Y = A[1]
  Z = ((X**2+Y**2)**0.5)
  if Z<= 5:
    B+=1
print(B)


Fixed code:
N, D  = [int(i) for i in input().split()]
X = int(0)
Y = int(0)
B = int(0)
Z = int(0)
for i in range(N):
  A = []
  A = [int(N) for N in input().split()]
  X = A[0]
  Y = A[1]
  Z = ((X**2+Y**2)**0.5)
  if Z<= D:
    B+=1
print(B)
Buggy code:
N, D = map(int, input().split())
list1 = [0] * N
list2 = [0] * N
count = 0
for i in range(N):
    list1[i], list2[i] = map(int, input().split())

for i in range(N):
    if list1[i]**2 + list2[i]**2 >= D**2:
        count += 1
    else:
        continue
print(count)

Fixed code:
N, D = map(int, input().split())
list1 = [0] * N
list2 = [0] * N
count = 0
for i in range(N):
    list1[i], list2[i] = map(int, input().split())

for i in range(N):
    if list1[i]**2 + list2[i]**2 <= D**2:
        count += 1
    else:
        continue
print(count)
Buggy code:
I=lambda:list(map(int,input().spilt()))
n,d=I()
def ch(a,b):
    return a**2+b**2
ans=0
for i in range(n):
    x,y=I()
    if ch(x,y)<=d:
        ans+=1
print(ans)
    
    

Fixed code:
I=lambda:list(map(int,input().split()))
n,d=I()
def ch(a,b):
    return a**2+b**2
ans=0
for i in range(n):
    x,y=I()
    if ch(x,y)<=d*d:
        ans+=1
print(ans)
Buggy code:
def distance(N, D, point):
    count = 0
    for i in range(N):
        if sqrt(points[i][0]**2 + points[i][1]**2) <= D:
            count += 1
    return count


if __name__ == "__main__":
    N, D = map(int, input().split())
    points = []
    for _ in range(N):
        x, y = map(int, input.split())
        points.append([x,y])
    print(distance(N,D,points))

Fixed code:
import math

def distance(N, D, point):
    count = 0
    for i in range(N):
        if math.sqrt(points[i][0]**2 + points[i][1]**2) <= D:
            count += 1
    return count


if __name__ == "__main__":
    N, D = map(int, input().split())
    points = []
    for _ in range(N):
        x, y = map(int, input().split())
        points.append([x,y])
    print(distance(N,D,points))
Buggy code:
import math

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

print(count)

Fixed code:
import math

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

print(count)
Buggy code:
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)

Fixed code:
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 code:
import numpy as np

N = int(input())
D = int(input())
count = 0

for i in range(N): 
    x = int(input())
    y = int(input())
    d = np.sqrt(x**2+y**2)

    if d <= D:
        count += 1 

print(count)  



Fixed code:
import numpy as np

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

for i in range(N): 
    x,y = input().split()
    x = int(x)
    y = int(y)
    d = np.sqrt(x**2+y**2)

    if d <= D:
        count += 1 

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

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

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

print(c)

Fixed code:
n, d = input().split()
n = int(n)
d = int(d)
xy = [map(int, input().split()) for _ in range(n)]
x, y = [list(i) for i in zip(*xy)]
c = 0

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

print(c)
Buggy code:
from math import *
from collections import *
from random import *
from bisect import *
import sys
input=sys.stdin.readline
def lis():
    return list(map(int,input().split()))
def ma():
    return map(int,input().split())
def inp():
    return int(input())
n,d=ma()
r=0
for i in range(n):
    x,y=ma()
    f=(x*x)+(y*y)
    f=pow(x,0.5)
    if(f<=d):
        r+=1
print(r)
    
            

        
            
        
    
        
    


Fixed code:
#from math import *
from collections import *
from random import *
from bisect import *
import sys
input=sys.stdin.readline
def lis():
    return list(map(int,input().split()))
def ma():
    return map(int,input().split())
def inp():
    return int(input())
n,d=ma()
r=0
for i in range(n):
    x,y=ma()
    f=(x*x)+(y*y)
    f=pow(f,0.5)
    if(f<=d):
        r+=1
print(r)
Buggy code:
N,D=map(int, input().split())
A = 0
for i in range(N):
    X,Y=map(int, input().split())
    if (D*D) >= (X*X)+(Y*Y):
        A +=1 
        print(A)
print(A)

Fixed code:
N,D=map(int, input().split())
A = 0
for i in range(N):
    X,Y=map(int, input().split())
    if (D*D) >= (X*X)+(Y*Y):
        A +=1 
print(A)
Buggy code:
import math
N, D = list(map(int, input().split()))
result = 0
list = []
count = 0
for i in range(N):
    X, Y = map(int, input().split())
    result = math.sqrt(X**2 + Y**2)
    list.append(result)
for j in list:
    if j >= D:
        count += 1

Fixed code:
import math
N, D = list(map(int, input().split()))
result = 0
list = []
count = 0
for i in range(N):
    X, Y = map(int, input().split())
    result = math.sqrt(X**2 + Y**2)
    list.append(result)
for j in list:
    if j <= D:
        count += 1
print(count)
Buggy code:
import math
N,D=map(int,input().split())
i=0
for i in range(N):
    x,y=map(int,input().split())
    if math.sqrt(x**2+y**2)<=D:
        i+=1

print(i)

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

print(j)
Buggy code:
n,d = [int(x) for x in input().split()]
x = []
y = []
for i in range(n):
  x1,y1 = [int(x) for x in input().split()]
  x.append(x1)
  y.append(y1)
c = 0
for i in range(n):
  s = x[i] ** 2 + y[i] ** 2
  if s < d ** 2:
    c += 1
print(c)

Fixed code:
n,d = [int(x) for x in input().split()]
x = []
y = []
for i in range(n):
  x1,y1 = [int(x) for x in input().split()]
  x.append(x1)
  y.append(y1)
c = 0
for i in range(n):
  s = x[i] ** 2 + y[i] ** 2
  if s <= d ** 2:
    c += 1
print(c)
Buggy code:
import sqrt
N,D=map(int,input())
ans=0
for _ in range(N):
  p,q=map(int,input().split())
  if math.sqrt(p**2+q**2)<=D:
    ans+=1
print(ans)

Fixed code:
import math
N,D=map(int,input().split())
ans=0
for _ in range(N):
  p,q=map(int,input().split())
  if math.sqrt(p**2+q**2)<=D:
    ans+=1
print(ans)
Buggy code:
import math
data = [list(map(int, input().split())) for i in range(n)]
def dist(x, y):
    return math.sqrt(x**2 + y**2)
count = 0
for i in range(n):
    dis = dist(data[i][0], data[i][1])
    if dis <= d:
        count += 1

print(count)


Fixed code:
import math
n, d = list(map(int, input().split()))
data = [list(map(int, input().split())) for i in range(n)]
def dist(x, y):
    return math.sqrt(x**2 + y**2)


count = 0
for i in range(n):
    dis = dist(data[i][0], data[i][1])
    if dis <= d:
        count += 1

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

Fixed code:
from math import sqrt
n,d = map(int,input().strip().split())
cnt = 0
for i in range(n):
	x,y = map(int,input().strip().split())
	# print(x,y)
	if x*x+y*y <= d*d:
		# print(x,y)
		cnt+=1
print(cnt)
Buggy code:
n,d=map(int,input().split())
t=0
for i in range(n):
    a,b=map(int,input().split())
    if a*a+b*b<=d*d:
        t+=1
print(n)

Fixed code:
n,d=map(int,input().split())
t=0
for i in range(n):
    a,b=map(int,input().split())
    if a*a+b*b<=d*d:
        t+=1
print(t)
Buggy code:
import math
def dist(x,y):
  return math.sqrt(x**2+y**2)

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

Fixed code:
import math

def dist(x,y):
  return math.sqrt(x**2+y**2)

n,d=map(int,input().split())
i=0
for _ in range(n):
  x,y=map(int,input().split())
  if dist(x,y)<=d:
    i+=1
    
print(i)
Buggy code:
N,D=map(int,input().split())
l=[]
l1=[]
count=0
for i in range(N):
  x,y=map(int,input().split())
  l.append(x)
  l1append(y)
for i in range(N):
  if (l[i]**2 +l1**2)**0.5 <=D:
    count+=1
print(count)    
  

Fixed code:
N,D=map(int,input().split())
l=[]
l1=[]
count=0
for i in range(N):
  x,y=map(int,input().split())
  l.append(x)
  l1.append(y)
for i in range(N):
  if (l[i]**2 +l1[i]**2)**0.5 <=D:
    count+=1
print(count)
Buggy code:
N, D = list(map(int, input().split()))
xy_list = list()
ans = 0
for i in range(N):
	x, y = map(int, input().split())
	if ((x, y) in xy_list):
		continue
	xy_list.append((x, y))
	if (x*x + y*y <= D*D):
		ans += 1
print(ans)


Fixed code:
N, D = map(int, input().split())
xy_list = list()
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

m, n = map(int, input().split())
c = 0
for lp in range(m):
    a, b = map(int, input().split())
    if math.sqrt((a * a) + (b * b)) >= n:
        c = c + 1
print(c)

Fixed code:
import math

m, n = map(int, input().split())
c = 0
for lp in range(m):
    a, b = map(int, input().split())
    if math.sqrt((a * a) + (b * b)) <= n:
        c = c + 1
print(c)
Buggy code:
N, D = map(int, input().split())
XY = [list(map(int, input().split())) for _ in range()]

print(sum(x**2 + y**2 <= D**2 for x, y in XY))

Fixed code:
N, D = map(int, input().split())
XY = [list(map(int, input().split())) for _ in range(N)]

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

Fixed code:
import math
N, D = map(int, input().split())
n = 0
for i in range(N):
  x, y = map(int, input().split())
  if math.sqrt(x**2+y**2) <= D:
    n += 1
print(n)
Buggy code:
n, d = map(int, input().split())
count = 0
for i in range(n):
  a, b = map(int, input().split())
  if ((a+b)*(a-b))**(1/2) <= d:
    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())
  k = a**2 + b**2
  if k >= 0:
  	if (k)**(1/2) <= d:
  		count += 1
print(count)
Buggy code:
N,D=map(int, input().split())
ans=0
for _ 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 _ 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, max_dist = input().split()

print(n)
print(max_dist)
points = 0

for _ in range(int(n)):
    x, y = input().split()
    x = int(x)
    y = int(y)

    dist = math.sqrt(x * x + y * y)

    if dist <= float(max_dist):
        points += 1

print(points)
    

Fixed code:
import math

n, max_dist = input().split()

points = 0

for _ in range(int(n)):
    x, y = input().split()
    x = int(x)
    y = int(y)

    dist = math.sqrt(x * x + y * y)

    if dist <= float(max_dist):
        points += 1

print(points)
Buggy code:
import math
N , D = ( int(x) for x in input().split() )
X = [ ]
Y = [ ]

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


ans = 0
for i in range( len(X) ):
    x1 = X[i]
    y1 = Y[i]
    d = math.sqrt( (x1)**2 + (y1)**2 )
    print(x1,y1,d)
    if d <= D:
        ans += 1

print(ans)

Fixed code:
import math
N , D = ( int(x) for x in input().split() )
X = [ ]
Y = [ ]

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


ans = 0
for i in range( N ):
    x1 = X[i]
    y1 = Y[i]
    d = math.sqrt( (x1)**2 + (y1)**2 )
    if d <= D:
        ans += 1

print(ans)
Buggy code:
N,D = map(int, input().split())
ans = 0

for n 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 n in range(N):
    X,Y = map(int, input().split())
    
    if X*X + Y*Y <= D*D:
        ans += 1

print(ans)
Buggy code:
import numpy as np

N, D = list(map(int, input().split())) 
cnt = 0
for n in range(0, N):
  x, y = list(map(int, input().split())) 
  if  (x*x + y*y) >= D*D:
    cnt += 1

print(cnt)


Fixed code:
import numpy as np

N, D = list(map(int, input().split())) 
cnt = 0
for n in range(0, N):
  x, y = list(map(int, input().split())) 
  if  (x*x + y*y) <= D*D:
    cnt += 1

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

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

for i in range(n):
    Z = list(map(int, input().split()))
    X = Z[0]
    Y = Z[1]

    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):
    Z = list(map(int, input().split()))
    X = Z[0]
    Y = Z[1]

    if X**2 + Y**2 <= d**2:
        cnt += 1
print(cnt)
Buggy code:
import math
N, D = map(int, input().split())
P = [list(map(int, input().split()) for _ in range(N))]

cnt = 0
for i in range(N):
    d = math.sqrt(P[0]**2 + P[1]**2)
    if d <= D:
        cnt += 1

Fixed code:
import math
N, D = map(int, input().split())
P = [list(map(int,input().split())) for i in range(N)]

cnt = 0
for i in range(N):
    d = math.sqrt(int(P[i][0])**2 + int(P[i][1])**2)
    if d <= D:
        cnt += 1

print(cnt)
Buggy code:
n, d = map(int, input().split())
lst = [[int(j) for j in input().split()] for i in range(n)]
count = 0
for d in lst:
  distance = (d[0]**2 + d[1]**2)**0.5
  if distance <= d:
    count += 1
print(count)

Fixed code:
n, d = map(int, input().split())
lst = [[int(j) for j in input().split()] for i in range(n)]
count = 0
for x in lst:
  distance = (x[0]**2 + x[1]**2)**0.5
  if distance <= d:
    count += 1
print(count)
Buggy code:
import math

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

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



Fixed code:
import math

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

for i in range(n):
  a,b = map(int,input().split())
  dis = math.sqrt(a*a+b*b)
  if dis <= d:
    cou +=1
 
print(cou)
Buggy code:
N, D = map(int, input().split())
L = [list(map(int, input().split())) for i in range(N)]
counter = 0

for list in L:
  if list[0]**2+ list[1]**2 <= D:
    counter = counter + 1

print(str(counter))

Fixed code:
N, D = map(int, input().split())
L = [list(map(int, input().split())) for i in range(N)]
counter = 0
 
for list in L:
  if list[0]**2+ list[1]**2 <= D**2:
    counter = counter + 1
 
print(str(counter))
Buggy code:
N, D = map(int, input().split())
X_Y = []
for i in range(N):
    X_Y.append(list(map(int, input().split())))
    
ans = 0
for n in range(N):
  x, y = X_Y[n]
  if(x**2 + y**2 <= D): ans += 1

print(ans)




Fixed code:
import math

N, D = map(int, input().split())
X_Y = []
for i in range(N):
    X_Y.append(list(map(int, input().split())))
    
ans = 0
for n in range(N):
  x, y = X_Y[n]
  if(math.sqrt(x**2 + y**2) <= D): ans += 1

print(ans)
Buggy code:

#ABC174B

N,D = map(int,input.split())
X = []
Y = []
for _ in range(N):
    x,y = map(int,input().split())
    X.append(x)
    Y.append(y)

count = 0

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

Fixed code:

#ABC174B

N,D = map(int,input().split())
X = []
Y = []
for _ in range(N):
    x,y = map(int,input().split())
    X.append(x)
    Y.append(y)

count = 0

for i in range(N):
    if D**2 >= X[i]**2 + Y[i]**2:
        count += 1
print(count)
Buggy code:
import math
n,d = map(int,input().split())
c = 0
for i in range(n):
    x,y = map(int,input().split())
    D = math.sqrt((x*x)+(y*y))
    if(int(D)>=d):
        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())
    D = math.sqrt((x*x)+(y*y))
    if(D <=d):
        c+=1
print(c)
Buggy code:
import math
N,D = [int(x) for x in input().split()]
count = 0
for i in range(D):
  X,Y = [int(x) for x in input().split()]
  if math.sqrt(X**2 + Y**2) <= D:
      count += 1
print(count)      

Fixed code:
import math
N,D = [int(x) for x in input().split()]
count = 0
for i in range(0,N):
  X,Y = [int(x) for x in input().split()]
  if math.sqrt(X**2 + Y**2) <= D:
      count += 1
print(count)
Buggy code:
import math
a = list(map(int,input().split()))
#N a[0]
#D a[1]
d = 0
for i in range(a[0]):
    b = list(map(int,input().split()))
    c = math.sqrt(b[0]*b[0]+b[1]*b[1])
    if c >= a[1]: d=d+1
print(d)

Fixed code:
import math
a = list(map(int,input().split()))
#N a[0]
#D a[1]
d = 0
for i in range(a[0]):
    b = list(map(int,input().split()))
    c = math.sqrt(b[0]*b[0]+b[1]*b[1])
    if a[1] >= c: d=d+1
print(d)
Buggy code:
import math
n,d = map(int,input().split())
xy = [list(map(int,input().split())) for _ in range(n)]
cnt = 0
for i in range(n):
	if math.sqrt((xy[0])**2 + (xy[1])**2) <= d:
		cnt += 1
print(cnt)

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

ans = 0
for i in range(N):
  x,y = map(int,input().split())
  d = math.sprt(x**2 + y**2)
  if d <= 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())
  d = math.sqrt(x**2 + y**2)
  if d <= D:
    ans += 1
print(ans)
Buggy code:
N,D = map(int(),input().split())
answer = 0
for i in range(N):  
    x,y = map(int(),input().split())
    if(D**2 >= x**2+y**2):
        answer += 1
print(answer)

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

cnt=0

for x,y in list(map(int,input().split())):
    if x**2+y**2<=d**2:
        cnt+=1

print(cnt)

Fixed code:
n,d=list(map(int,input().split()))

cnt=0

for _ in range(n):
    x,y=list(map(int,input().split()))
    if x**2+y**2<=d**2:
        cnt+=1

print(cnt)
Buggy code:
N,D=map(int, input().split())
a=0
for i in str(N):
  x,y=map(int, input().split())
  if x*x+y*y<=D*D:
    a+=1
  else:
    pass
print(a)


Fixed code:
N,D=map(int, input().split())
a=0
for i in range(N):
  x,y=map(int, input().split())
  if x*x+y*y<=D*D:
    a+=1
  else:
    pass
print(a)
Buggy code:
[N, D] = input().split()
s = 0
D = int(D)
for i in range(N):
    [X, Y] = input().split()
    X = int(X)
    Y = int(Y)
    Z = X**2 + Y**2
    if Z <= D:
        s +=1
print(s)        

Fixed code:
[N, D] = input().split()
s = 0
N = int(N)
D = int(D)
D = D**2
for i in range(N):
    [X, Y] = input().split()
    X = int(X)
    Y = int(Y)
    Z = X**2 + Y**2
    if Z <= D:
        s += 1
print(s)
Buggy code:
N,D=map(int,input().split())
c=0
for i in range(N):
  X,Y=map(int,input().split())
  if X**2+Y**2>=D**2:
    c+=1
print(c)
  


Fixed code:
N,D=map(int,input().split())
c=0
for i in range(N):
  X,Y=map(int,input().split())
  if X**2+Y**2<=D**2:
    c+=1
print(c)
Buggy code:
import math
N, D= list(map(int,input().split()))
cnt = 0
for i in range(N):
    x, y = list(map(int, input().split()))
    #print(math.sqrt((x^2)+(y^2)))
    if math.sqrt((x*x)+(y*y)) <= D:
        cnt+=1
        
        

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

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


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

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

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

for _ in range(N):
  x,y = map(int, input().split())
  
  if (x**2 + y**2) <= D**2:
    count += 1
  
  
print(count)
Buggy code:
nd = input().split()
N = int(nd[0])
D = int(nd[1])

ans = 0

for i in range(N-1):
    xy = input().split()
    x = int(xy [2*i])
    y = int(xy [2*i+1])
    d = x**2 + y**2
    if d < D:
        ans += 1

print(ans)

Fixed code:
nd = input().split()
N = int(nd[0])
D = int(nd[1])
D = D**2

ans = 0

for i in range(N):
    ls = input().split()
    x = int(ls[0])
    y = int(ls[1])
    d = x**2 + y**2
    if d <= D :
        ans += 1

print(ans)
Buggy code:
import math

N,D = map(int, input().split())
count = 0
for i in range(0, N):
  x[i] = list(int(input()))
  if D >= math.sqrt(x[i][0]**2 + x[i][1]**2):
    count += 1

print(count)
              

Fixed code:
import math
 
N,D = map(int, input().split())
count = 0
for i in range(0, N):
  x = list(map(int, input().split()))
  if D >= math.sqrt(x[0]**2 + x[1]**2):
    count = count + 1
 
print(count)
Buggy code:
from math import sqrt

def main():
    n, d = map(int, input().split())
    xy = [list(map(int, input().split())) for _ in range(n)]
    print(n, d)
    print(xy)
    cnt = 0
    for x, y in xy:
        xy_d = sqrt(x**2 + y**2)
        if xy_d <= d:
            cnt +=1
    print(cnt)
    
if __name__ == '__main__':
    main()

Fixed code:
from math import sqrt

def main():
    n, d = map(int, input().split())
    xy = [list(map(int, input().split())) for _ in range(n)]
    cnt = 0
    for x, y in xy:
        xy_d = sqrt(x**2 + y**2)
        if xy_d <= d:
            cnt +=1
    print(cnt)

if __name__ == '__main__':
    main()
Buggy code:
import numpy as np

N, D = list(map(int, input().split()))
ans = 0
for i in range(N):
    x, y = list(map(int, input().split()))
    r = np.sqrt(x**2 + y**2)
    if r < D:
        ans += 1

print(ans)


Fixed code:
import numpy as np

N, D = list(map(int, input().split()))
ans = 0
for i in range(N):
    x, y = list(map(int, input().split()))
    r2 = x**2 + y**2
    if r2 <= D**2:
        ans += 1

print(ans)
Buggy code:
n, d = map(int, input().split())
x = []
y = []
cnt = 0

for i in range(n):
  x.append(int(input()))
  y.append(int(input()))

for j in range(n):
  l = (x[j] ** 2 + y[j] ** 2) ** (1 / 2)
  if l <= d:
    cnt += 1
  else:
    continue

print(cnt)

Fixed code:
n, d = map(int, input().split())
lists = []
cnt = 0

for i in range(n):
  x, y = map(int, input().split())
  lists.append([x, y])
  

for j in range(n):
  l = (lists[j][0] ** 2 + lists[j][1] ** 2) ** (1 / 2)
  if l <= d:
    cnt += 1
  else:
    continue

print(cnt)