Problem:
Circles Intersection You are given circle $A$ with radius $r_a$ and with central coordinate $(x_a, y_a)$ and circle $B$ with radius $r_b$ and with central coordinate $(x_b, y_b)$. Write a program which prints:  "2" if $B$ is in $A$,  "-2" if $A$ is in $B$,  "1" if circumference of $A$ and $B$ intersect, and  "0" if $A$ and $B$ do not overlap.  You may assume that $A$ and $B$ are not identical. Input The input consists of multiple datasets. The first line consists of an integer $N$ ($N \leq 50$), the number of datasets. There will be $N$ lines where each line represents each dataset. Each data set consists of real numbers:  $x_a$ $y_a$ $r_a$ $x_b$ $y_b$ $r_b$  Output For each dataset, print 2, -2, 1, or 0 in a line. Sample Input 2
0.0 0.0 5.0 0.0 0.0 4.0
0.0 0.0 2.0 4.1 0.0 2.0 Output for the Sample Input 2
0

Solution (Python):
for q in range(int(input())):
    xa, ya, ra, xb, yb, rb = map(float, input().split())
    d2 = ((xb - xa) ** 2) + ((yb - ya) ** 2)
    if rb < ra and d2 < ((ra - rb) ** 2):
        print(2)
    elif ra < rb and d2 < ((rb - ra) ** 2):
        print(-2)
    elif ((ra + rb) ** 2) < d2:
        print(0)
    else:
        print(1)

Solution (Python):
N=int(input())
for i in range(N):
    x1,y1,r1,x2,y2,r2=map(float,input().split())
    d=((x1-x2)**2+(y1-y2)**2)**0.5
    if r1-r2>d:
        if r1==r2+d:
            print("1")
        else:
            print("2")
    elif r2-r1>d:
        if r2==r1+d:
            print("1")
        else:
            print("-2")
    elif d<r1+r2:
        print("1")
    elif r1+r2==d:
        print("1")
    elif d>r1+r2:
        print("0")

Solution (Python):
n = int(input())
for i in range(n):
  xa, ya, ra, xb, yb, rb = map(float, input().split())
  d = ((xa - xb) ** 2 + (ya - yb) ** 2) ** 0.5
  if rb < ra and d < ra - rb:
    print("2")
  elif ra < rb and d < rb - ra:
    print("-2")
  elif d <= ra + rb:
    print("1")
  else:
    print("0")

Solution (Python):
import math

n = int(input())

for _ in range(n):
  x_a,y_a,r_a,x_b,y_b,r_b = map(float, input().split())
  r_ab_plus = r_a + r_b
  r_ab_minus = abs(r_a-r_b)
  dist_center = math.sqrt((x_a-x_b)**2 + (y_a-y_b)**2)
  if dist_center < r_ab_minus and r_a > r_b:
    print(2)
  elif dist_center < r_ab_minus and r_b > r_a:
    print(-2)
  elif r_ab_minus <= dist_center and dist_center <= r_ab_plus:
    print(1)
  else:
    print(0)

Solution (Python):
n=int(input())
for i in range(n):
    x1,y1,r1,x2,y2,r2=map(float,input().split())
    d=((x1-x2)**2+(y1-y2)**2)**0.5
    r_min=min(r1,r2)
    r_max=max(r1,r2)
    if r_max>r_min+d:
        if r1>r2:
            print(2)
        else:
            print(-2)
    elif d<=r1+r2:
        print(1)
    else:
        print(0)

Solution (Python):
n = int(input())
E = 10**-10
for i in range(n):
	xa,ya,ra,xb,yb,rb = [float(i) for i in input().split()]
	x = ((xb-xa)**2 + (yb-ya)**2)**0.5
	xmax = x+rb
	xmin = x-rb
	if ra - xmax > E:
		print(2)
	elif xmin - (-ra) < -E:
		print(-2)
	elif xmin - ra > E:
		print(0)
	else:
		print(1)

Solution (Python):
for _ in range(int(input())):
    x1, y1, r1, x2, y2, r2 = [float(x) for x in input().split()]
    distance = ((x1 - x2)**2 + (y1 - y2)**2)**0.5
    if distance > r1 + r2:
        print(0)
    else:
        if r1 > r2 and distance + r2 < r1:
            print(2)
        elif r1 < r2 and distance + r1 < r2:
            print(-2)
        else:
            print(1)

Solution (Python):
n = int(input())

for _ in range(n):
    xa, ya, ra, xb, yb, rb = map(float, input().split())
    if xa - ra < xb - rb and xa + ra > xb + rb and ya - ra < yb - rb and ya + ra > yb + rb:
        print(2)
    elif xa - ra > xb - rb and xa + ra < xb + rb and ya - ra > yb - rb and ya + ra < yb + rb:
        print(-2)
    elif (xa - xb)**2 + (ya - yb)**2 <= (ra + rb)**2:
        print(1)
    else:
        print(0)

Solution (Python):
import math

def judge(dist, p, q):
    if p + q >= dist:
        if dist + p < q:
            ans.append(-2)
        elif dist + q < p:
            ans.append(2)
        else:
            ans.append(1)
    else:
        ans.append(0)

N = int(input())
circles = [list(map(float, input().split())) for _ in range(N)]
ans = []

for circle in circles:
    xa, ya, ra, xb, yb, rb = circle
    distance = math.sqrt((xa-xb)**2 + (ya-yb)**2)
    judge(distance, ra, rb)

print('\n'.join(map(str, ans)))

Solution (Python):
n = int(input())
for _ in range(n):
    xa,ya,ra,xb,yb,rb = map(float, input().split())
    dr = ((xa-xb)**2+(ya-yb)**2)**0.5
    if rb > (ra+dr):
        print(-2)
        continue
    elif ra > (rb+dr):
        print(2)
        continue
    elif dr > (ra+rb):
        print(0)
        continue
    else:
        print(1)

Solution (Python):
import math
from decimal import Decimal, getcontext

getcontext().prec = 100

def solve():
    N = int(input())
    
    for _ in range(N):
        xa, ya, ra, xb, yb, rb = map(Decimal, input().split())
        t = getcontext().power(xa - xb, Decimal('2')) + getcontext().power(ya - yb, Decimal('2'))
        D = t.sqrt()
        
        if ra > D + rb:
            print('2')
        elif rb > D + ra:
            print('-2')
        elif D <= ra + rb:
            print('1')
        else:
            print('0')

if __name__ == "__main__":
    solve()