qyliang/CodeNanoFix huggingface dataset:
Buggy code:
n,d = map(int,input().split())
a=[]
b=[]
cnt = 0
for i in range(n):
    a[i],b[i] = map(int,input().split())
    if(sqrt(a[i]**2+b[i]**2)<=d)
        cnt += 1
print("{}".format(cnt))

Fixed code:
n,d = map(int,input().split())
a=[]
b=[]
cnt = 0
for i in range(n):
    c, e = map(int,input().split())
    if c**2+e**2<=d**2:
        cnt += 1
print("{}".format(cnt))
Buggy code:
n ,d = map(int,input().split())

ans = 0
for i in range(n):
    x,y = map(int,input().split())
    if d**2 <= x**2 + y**2 :
        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 d**2 >= x**2 + y**2 :
        ans += 1

print(ans)
Buggy code:
def q2():
    import math
    n, d = map(int, input().split())
    points = set([tuple(int(v) for v in input().split()) for v in range(n)])
    print(points)

    res = [math.sqrt((x**2 + y**2)) <= d for x, y in points]
    print(sum(res))


if __name__ == "__main__":
    # q1()
    q2()


Fixed code:

def q2():
    import math
    n, d = map(int, input().split())
    points = [[int(v) for v in input().split()] for v in range(n)]

    res = [math.sqrt((x**2 + y**2)) <= d for x, y in points]
    print(sum(res))



if __name__ == "__main__":
    # q1()
    q2()
Buggy code:
n,d = map(int,input().split())
l = []
for i in range(n):
  x,y = map(int,input().split())
  l.append([x,y])
ans = 0
for j in l:
  if j[0]**2 + j[1]**2 < d**2:
    ans += 1
print(ans)

Fixed code:
n,d = map(int,input().split())
l = []
for i in range(n):
  x,y = map(int,input().split())
  l.append([x,y])
ans = 0
for j in l:
  if j[0]**2 + j[1]**2 <= d**2:
    ans += 1
print(ans)
Buggy code:
from sys import stdin

n, d = stdin.readline().rstrip().split()

n = int(n)
d = int(d)

data = [stdin.readline().rstrip().split() for _ in range(n)]

count = 0
for i in range(n):
  if int(data[i][0]) * int(data[i][0]) + int(data[i][1]) * int(data[i][1]) < d + 1:
    count = count + 1

print(count)



Fixed code:
from sys import stdin
import math

n, d = stdin.readline().rstrip().split()

n = int(n)
d = int(d)

data = [stdin.readline().rstrip().split() for _ in range(n)]

count = 0
for i in range(n):
  if math.sqrt(int(data[i][0]) * int(data[i][0]) + int(data[i][1]) * int(data[i][1])) <= d:
    count = count + 1

print(count)
Buggy code:
n, d=map(int,input().split())

c = 0
for i in range(n):
    s = [int(i) for i in input().split()]
    if ((s[0]**2) + s[1]**2)**(1/2) >= d:
        c += 1

print(c)

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

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

print(c)
Buggy code:
N=int(input())
D=int(input())
ans=0
for i in range(N):
  x,y=int(input()).split()
  if x*x + y*y <= D*D
  ans+=1
print(ans)

Fixed code:
N,D=[int(i) for i in input().split()]
ans=0
for i in range(N):
  x,y=[int(i) for i in input().split()] 
  if x*x + y*y <= D*D:
      ans += 1
print(ans)
Buggy code:
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)


Fixed code:
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 code:
import math
n, d = map(int, input().split())
num = 0
ans = 0

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

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

for i in range(n):
  x, y = map(int, input().split())
  num = math.sqrt(x**2 + y**2)
  if num <= d:
    ans += 1
    
print(ans)
Buggy code:
import math
li = input()
n = int(li.split()[0])
d = int(li.split()[1])
max_distance = math.sqrt(d**2)
ans = 0
for _ in range(n):
    li = input()
    x = int(li.split[0])
    y = int(li.split[1])
    distance = math.sqrt(x**2 + y**2)
    if distance <= max_distance:
        ans += 1
print(ans)

Fixed code:
import math
li = input()
n = int(li.split()[0])
d = int(li.split()[1])
max_distance = math.sqrt(d**2)
ans = 0
for _ in range(n):
    li = input()
    x = int(li.split()[0])
    y = int(li.split()[1])
    distance = math.sqrt(x**2 + y**2)
    if distance <= max_distance:
        ans += 1
print(ans)
Buggy code:
N, D = map(int, input().split())
num = [input().split() for _ in range(N)]
 
X = []
Y = []
count = 0
 
for n in num:
    X.append(int(n[0]))
    Y.append(int(n[1]))
 
for x, y in  zip(X, Y):
    dist = x**2 + y**2
    if dist <= D**2:
        count += 1

Fixed code:
N, D = map(int, input().split())
num = [input().split() for _ in range(N)]
 
X = []
Y = []
count = 0
 
for n in num:
    X.append(int(n[0]))
    Y.append(int(n[1]))
 
for x, y in  zip(X, Y):
    dist = x**2 + y**2
    if dist <= D**2:
        count += 1
 
print(count)
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)**(0.5) >= 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**2 + y**2)**(0.5) <= d:
        ans += 1 

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

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

Fixed code:
n,d=map(int,input().split())
d=d*d
count=0
for _ in range(n):
	x,y=map(int,input().split())
	if(x*x+y*y<=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())
    distance = (x**2 + y**2)**1/2
    if distance <= 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())
    distance = (x**2 + y**2)**0.5
    if distance <= d :
        ans += 1
print(ans)
Buggy code:
import sys
N, D = map(int, input().split())
ans = 0
for _ in range(N):
    x, y = map(int, sys.stdin.readline().split())
    if x ** + y** <= D**:
        ans += 1
print(ans)

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

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

line = input()
N = line.split(' ')[0]
D = line.split(' ')[1]

count = 0

for i in range(1,int(D)):
  inputs = input()
  X = int(inputs.split(' ')[0])
  Y = int(inputs.split(' ')[1])
  if(math.sqrt(pow(X,2) + pow(Y,2)) <= int(D) ):
    count = count + 1

print(count)

Fixed code:
import sys
import math

line = input()
N = line.split(' ')[0]
D = line.split(' ')[1]

count = 0

for i in range(int(N)):
  inputs = input()
  X = int(inputs.split(' ')[0])
  Y = int(inputs.split(' ')[1])
  if(math.sqrt(pow(X,2) + pow(Y,2)) <= int(D) ):
    count = count + 1

print(count)
Buggy code:
import math

def inputToIntList():
	return list(map(int, input().split()))


x = inputToIntList()
count = x[0]
d0 = x[1]
result = []

for _ in range(count):
    point = inputToIntList()
    d1 = math.sqrt(point[0]**2 + point[1]**2)
    if d1 < d0:
        result.append(d1)

print(len(result))

Fixed code:
import math

def inputToIntList():
	return list(map(int, input().split()))


x = inputToIntList()
count = x[0]
d0 = x[1]
result = []

for _ in range(count):
    point = inputToIntList()
    d1 = math.sqrt(point[0]**2 + point[1]**2)
    if d1 <= d0:
        result.append(d1)
        
print(len(result))
Buggy code:
import sys


input_array = list()
N, D = map(int, input().split())
if 1 <= N and N <= 2*10**5:
    for _ in range(N):
        input_array.append(map(int, input().split()))

count = 0
for x0, x1 in input_array:
    if 0 <= D and D <= 2*10**5:
        if abs(x0) <= 2*10**5 and abs(x1) <= 2*10**5:            
            print((int(x0)**2 + int(x1)**2)**(1/2))
            if D >= (int(x0)**2 + int(x1)**2)**(1/2):
                count += 1
print(count)

Fixed code:
import sys


input_array = list()
N, D = map(int, input().split())
if 1 <= N and N <= 2*10**5:
    for _ in range(N):
        input_array.append(map(int, input().split()))

count = 0
for x0, x1 in input_array:
    if 0 <= D and D <= 2*10**5:
        if abs(x0) <= 2*10**5 and abs(x1) <= 2*10**5:            
            if D >= (int(x0)**2 + int(x1)**2)**(1/2):
                count += 1
print(count)
Buggy code:
N,D=map(int,input().split())
X=[]
Y=[]
for i in range(N):
    x,y=input().split()
    X.append(int(x))
    Y.append(int(y))

import math
def get_distance(x,y):
    d=math.sqrt((x**2+y**2))
    return d

a=0
for i in range(N):
    distance=get_distance(x=X[i],y=Y[i])
    if distance<=N:
        a+=1
print(a)

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

import math
def get_distance(x,y):
    d=math.sqrt(((x)**2+(y)**2))
    return d

a=0
for i in range(N):
    distance=get_distance(x=X[i],y=Y[i])
    if distance<=D:
        a+=1
print(a)
Buggy code:
n,d = map(int,input().split())
ans = 0
for i in range(n):
    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 numpy as np

temp = input().split()

s = [input().split() for i in range(int(temp[0]))]

cnt = 0

for i in range(int(temp[0])):
  if np.sqrt(int(s[i][0])*int(s[i][0]) + int(s[i][1])*int(s[i][1])) > int(temp[1]):
    cnt += 1

print(cnt)

Fixed code:
import numpy as np
temp = input().split()
s = [input().split() for i in range(int(temp[0]))]
cnt = 0
for i in range(int(temp[0])):
  if np.sqrt(int(s[i][0])*int(s[i][0]) + int(s[i][1])*int(s[i][1])) <= int(temp[1]):
    cnt += 1
print(cnt)
Buggy code:
import math

N, D = list(map(int, input().split(' ').rstrip()))

cnt = 0
def check(p, q):
  r = p**2 + q**2
  return math.sqrt(r)

for i in range(N):
  p, q = list(map(int, input().split(' ').rstrip()))
  if check(p, q) <= D:
    cnt += 1

print(cnt)


Fixed code:
import math
 
N, D = list(map(int, input().split(' ')))
 
cnt = 0
def check(p, q):
  r = p**2 + q**2
  return math.sqrt(r)
 
for i in range(N):
  p, q = list(map(int, input().split(' ')))
  if check(p, q) <= D:
    cnt += 1
 
print(cnt)
Buggy code:
N,D=map(int,input().split())
X=[]
Y=[]
for i in range(N)
    x,y=map(int,input().split())
    X.append(x)
    Y.append(y)
ans=0    
for i in range(N)
    if X[i]**2+Y[i]**2 <= D**2
    ans += 1

print(ans)


Fixed code:
N,D=map(int,input().split())
X=[]
Y=[]
for i in range(N):
    x,y=map(int,input().split())
    X.append(x)
    Y.append(y)
ans=0    
for i in range(N):
    if X[i]**2+Y[i]**2 <= D**2:
        ans += 1

print(ans)
Buggy code:
N,Q = [int(w) for w in input().split()]
i = 0
x = []
y = []
cile i < N:
    a,b = [int(w) for w in input().split()]
    x.append(a)
    y.append(b)
    i +=1
for i in range(N):
    m = (x[i]**2 + y[i]**2)**(1/2)
    if  m <= Q:
        count += 1
    else:
        count += 0
print(count)ount = 0

Fixed code:
N,Q = [int(w) for w in input().split()]
i = 0
x = []
y = []
count = 0
while i < N:
    a,b = [int(w) for w in input().split()]
    x.append(a)
    y.append(b)
    i +=1
for i in range(N):
    m = (x[i]**2 + y[i]**2)**(1/2)
    if  m <= Q:
        count += 1
    else:
        count += 0
print(count)
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
    
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**2 + y**2 <= D**2:
    ans += 1
    
print(ans)
Buggy code:
n, d = map(int, input().split())
res = 0
for i in range(n):
  x, y = map(int, input().split())
  if x ** 2 + y ** 2 <= d:
    res += 1
print(res)

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

ans = 0
for i in range(N):
  p, q = map(int, input().split())
  if p*p + q*q <= D:
    ans += 1
print(ans)

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

ans = 0
for i in range(N):
  p, q = map(int, input().split())
  if p*p + q*q <= D*D:
    ans += 1
print(ans)
Buggy code:
import sys
import numpy as np
from math import ceil as C, floor as F, sqrt
from collections import defaultdict as D
from functools import reduce as R

ALP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
alp = 'abcdefghijklmnopqrstuvwxyz'
def _X(): return sys.stdin.readline().rstrip().split(' ')
def _S(ss): return tuple(ss) if len(ss) > 1 else ss[0]
def S(): return _S(_X())
def Ss(): return list(S())
def _I(ss): return tuple([int(s) for s in ss]) if isinstance(ss, tuple) else int(ss)
def I(): return _I(S())
def _Is(ss): return list(ss) if len(ss) > 1 else [ss]
def Is(): return _Is(I())

n, lim = I()
ans = 0
cache = {}

def dist(x, y, lim):
  if (x,y) not in cache:
    cache[x,y] = sqrt(x*x + y*y) < lim
  return cache[x,y]

for _ in range(n):
  x, y = I()
  if dist(x, y, lim):
    ans += 1
    
print(ans)

Fixed code:
import sys
import numpy as np
from math import ceil as C, floor as F, sqrt
from collections import defaultdict as D
from functools import reduce as R
 
ALP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
alp = 'abcdefghijklmnopqrstuvwxyz'
def _X(): return sys.stdin.readline().rstrip().split(' ')
def _S(ss): return tuple(ss) if len(ss) > 1 else ss[0]
def S(): return _S(_X())
def Ss(): return list(S())
def _I(ss): return tuple([int(s) for s in ss]) if isinstance(ss, tuple) else int(ss)
def I(): return _I(S())
def _Is(ss): return list(ss) if len(ss) > 1 else [ss]
def Is(): return _Is(I())
 
n, lim = I()
ans = 0
cache = {}
 
def dist(x, y, lim):
  if (x,y) not in cache:
    cache[x,y] = sqrt(x*x + y*y) <= lim
  return cache[x,y]
 
for _ in range(n):
  x, y = I()
  if dist(x, y, lim):
    ans += 1
    
print(ans)
Buggy code:
n,d=map(int,input().split())
for i in range(n):
	a,b=map(int,input().split())
	if a*a+b*b<=d*d:ans+=1
print(ans)

Fixed code:
n,d=map(int,input().split())
ans=0
for i in range(n):
	a,b=map(int,input().split())
	if a*a+b*b<=d*d:ans+=1
print(ans)
Buggy code:
impourt sys

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


Fixed code:
import sys

count = 0
n, d = [int(i) for i in input().split()]
for i in range(n):
  x, y = [int(i) for i in input().split()]
  if x * x + y * y <= d * d:
    count += 1
print(count)
Buggy code:
import math
case, most = map(int, input().split())
summ = 0
for i in range(case):
    a, b = map(int, input().split())
    if math.sqrt((a * a) + (b * b)) >= most:
        print(a, b, i+1)
        summ += 1

print(summ)


Fixed code:
import math
case, most = map(int, input().split())
summ = 0
for i in range(case):
    a, b = map(int, input().split())
    if math.sqrt((a * a) + (b * b)) <= most:
        summ += 1

print(summ)
Buggy code:
n,d=map(int,input().split(" "))
c = 0
d *= d
for i in range(n):
  a,b=map(int,input().split(" "))
  if(a**2+b**2==d):
    c+=1
print(c)

Fixed code:
n,d = map(int,input().split(" "))
d *= d
c = 0
for i in range(n):
  a,b =map(int,input().split(" "))
  if(a**2 + b**2 <= d):
    c += 1
print(c)
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)**0.5 <=d:
        count += 1

print(count)




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

c = 0
for i in range(n):
    x , y = list(map(int , input().split()))
    dis = (x**2 + y**2)**(0.5)
    if dis <= d:
        c += 1

print(c)
Buggy code:
n, d = map(int, input().split())

print(n, d)

x = []
y = []

for i in range(n):
    tempx, tempy = map(int, input().split())
    x.append(tempx)
    y.append(tempy)

count = 0


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

print(count)


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

#print(n, d)

x = []
y = []

for i in range(n):
    tempx, tempy = map(int, input().split())
    x.append(tempx)
    y.append(tempy)

count = 0


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

print(count)
Buggy code:
n,d = map(int,input().split())
ans = 0
for i in range(n):
  x,y = map(int,input().split())
  D = x **2 + y ** 2
  if D <= d:
    ans = 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())
  D = x **2 + y ** 2
  if D <= d **2:
    ans = ans + 1
print(ans)
Buggy code:
N,D = map(int,input().split())
X=[]
Y=[]
count = 0
for i in range(N):
    a,b = map(float,input().split())
    X.append(a)
    Y.append(b)
for i in range(N):
    if (X[i]^2+Y[i]^2)^(1/2) <= D:
        count += 1

print(count)


Fixed code:
N,D = map(int,input().split())
X=[]
Y=[]
count = 0
for i in range(N):
    a,b = map(float,input().split())
    X.append(a)
    Y.append(b)
for i in range(N):
    if (X[i]**2+Y[i]**2)**(1/2) <= D:
        count += 1

print(count)
Buggy code:
import numpy as np

n, d = map(int, input().split())
count = 0
for i in range(n):
  p, q = map(int, input().split())
  abs = np.sqrt(p**2+q**2)
  if abs >= d:
    count += 1
print (count)

Fixed code:
import numpy as np

n, d = map(int, input().split())
count = 0
for i in range(n):
  p, q = map(int, input().split())
  abs = np.sqrt(p**2+q**2)
  if abs <= d:
    count += 1
print (count)
Buggy code:
N, D = [int(i) for i in input().split()]
print(N, D)
D2 = D ** 2
ans = 0
for i in range(N):
    X, Y = [int(i) for i in input().split()]
    if X**2 + Y**2 <= D2:
        ans += 1
print(ans)


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

ans = 0

for _ in range(n):
    x, y = map(int, readline().split())
    if x ** 2 + y ** 2 <= d ** 2:
        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**2 + y**2 <= d**2):
        ans += 1

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

Fixed code:
import math

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

for i in range(n):
    x[i]=list(map(int,input().split()))
print(x)
a=0
for i in range(n):
    if x[i][0]**2+x[i][1]**2<=d**2:
        a+=1

print(a)

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

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

a=0
for i in range(n):
    if x[i][0]**2+x[i][1]**2<=d**2:
        a+=1

print(a)
Buggy code:
N,D = map(int, input().split())
A = [list(map(int, input().split())) for _ in range(N)]

count = 0
for a in A:
  print(a[0]**2 + a[1]**2)
  if a[0]**2 + a[1]**2 <= D**2
     count += 1

print(count)

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

count = 0
for a in A:
  if a[0]**2 + a[1]**2 <= D**2:
     count += 1

print(count)
Buggy code:
N,D = map(int,input().split())
count = 0
for _ in range(N):
    a,b = map(int,input().split())
    val = (a ** 2 + b ** 2) ** 0.5
    if val >= D:
        count +=1
        
print(count)

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

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

A = []

for i in range(n):
  A_i = list(map(int, input().split()))
  A.append(A_i)
  
ans = 0

for j in A:
  if A[0] ** 2 + A[1] ** 2 <= d **2 :
    ans += 1

print(ans)

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

A = []

for i in range(n):
  A_i = list(map(int, input().split()))
  A.append(A_i)
  
ans = 0

for j in A:
  if (j[0] ** 2 + j[1] ** 2) <= d **2 :
    ans += 1

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

Fixed code:
n,d=map(int,input().split())
ctr=0
for i in range(n):
  x,y=map(int,input().split())
  t=(x**2+y**2)**(1/2)
  if t<=d:
    ctr+=1
print(ctr)
Buggy code:
n, d = map(int, input().split())
count = 0
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:
n, d = map(int, input().split())
count = 0
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 math
n,d=map(int(input().split()))
c=0
for i in range(n):
  a,b=map(int(input().split()))
  r=math.sqrt(a**2+b**2)
  if r<=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())
  r=math.sqrt(a**2+b**2)
  if r<=d:
    c+=1
print(c)
Buggy code:
n, d = map(int,input().split())
d = d*d
sumd = 0
for _ in range(n):
  a, b = map(int,input().split())
  if d <= a**2 + b **2: sumd += 1
print(sumd)

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

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

print(ans)

Fixed code:
n, d = map(int, input().split())
point = [list(map(int, input().split())) for i in range(n)]
d = d*d
ans = 0
for i in point:
    if d >= i[0]*i[0]+i[1]*i[1]:
        ans += 1

print(ans)
Buggy code:
n,d=map(int,input().split())
x=[0]*n
y=[0]*n
for i in range(n):
  x[i],y[i]=map(int,input().split())
ans=0
for i in range(n):
  if x[i]**2+y[i]**2<=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**2 + y**2) <= d**2:
        ans += 1
print(ans)