Go: package main

import (
        "fmt"
        "math"
)

func main() {
        var n int
        fmt.Scanf("%d", &n)
        for i := 0; i < n; i++ {
                var ax, ay, ar, bx, by, br float64
                fmt.Scanf("%f %f %f %f %f %f", &ax, &ay, &ar, &bx, &by, &br)

                d := math.Sqrt((bx-ax)*(bx-ax) + (by-ay)*(by-ay))
                if d <= ar + br {
                        if ar > br {
                                if ar > br + d {
                                        fmt.Println("2")
                                } else {
                                        fmt.Println("1")
                                }
                        } else {
                                if br > ar + d {
                                        fmt.Println("-2")
                                } else {
                                        fmt.Println("1")
                                }
                        }
                } else {
                        fmt.Println(0)
                }
        }
}

Python: from __future__ import (division, absolute_import, print_function,
                        unicode_literals)
from sys import stdin
from math import hypot, copysign

for n in xrange(int(stdin.readline())):
    xa, ya, ra, xb, yb, rb = (float(s) for s in stdin.readline().split())

    distance = hypot(xa - xb, ya - yb)
    diff = ra - rb

    if ra + rb < distance:
        print('0')
    elif abs(diff) <= distance:
        print('1')
    else:
        print(int(copysign(2, diff)))

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)

Python: for _ in[0]*int(input()):
 x,y,r,s,t,u=map(float,input().split())
 d=((x-s)**2+(y-t)**2)**.5
 print([[[1,0][r+u<d],-2][d<u-r],2][d<r-u])

Python: import math
count = int(input())
for i in range(count):
    x1,y1,r1,x2,y2,r2 =map(float,input().split())
    depth=(x1-x2)**2+(y1-y2)**2
    if depth> (r1+r2)**2:
        print(0)
    elif depth <(r1-r2)**2:
        if r1>r2:
            print(2)
        else:
            print(-2)
    else:
        print(1)

Python: n=int(input())
for i in range(n):
    points = input().split()
    p = list(map(float,points))
    if (p[3]-p[0])**2 + (p[4]-p[1])**2 <= (p[2]-p[5])**2:
        if p[5]>p[2]:
            print(-2)
        else:
            print(2)
    elif (p[0]-p[3])**2 + (p[1]-p[4])**2 > (p[2]-p[5])**2 and (p[0]-p[3])**2 + (p[1]-p[4])**2 <= (p[2]+p[5])**2:
        print(1)
    else:
        print(0)

Python: # -*- coding:utf-8 -*-

def main():
    import math
    for i in range(int(input())):
        xa,ya,ra,xb,yb,rb=map(float,input().split())
        d=math.sqrt((xa-xb)**2+(ya-yb)**2)
        if d>ra+rb:
            print(0)

        elif ra+rb>=d and d>=abs(ra-rb):
            print(1)

        elif d<abs(ra-rb):
            if ra>rb:
                print(2)
            elif ra<rb:
                print(-2)
        
            
    
        
if __name__ == '__main__':
    main()

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

Python: import math
N = int(input())
for _ in [0]*N:
    x1, y1, r1, x2, y2, r2 = map(float, input().split())
    dist = math.hypot(x2-x1, y2-y1)
    if dist+r2 < r1:
        print(2)
    elif dist+r1 < r2:
        print(-2)
    elif dist <= r1+r2:
        print(1)
    else:
        print(0)

Python: n=input()
for i in xrange(n):
	xa,ya,ra,xb,yb,rb=map(int,raw_input().split())
	d=(xa-xb)**2+(ya-yb)**2
	if d>(ra+rb)**2:
		print(0)
	elif ra>rb:
		if (ra-rb)**2>d:
			print(2)
		else:
			print(1)
	else:
		if (rb-ra)**2>d:
			print(-2)
		else:
			print(1)

Python: import math
def aux(v):
    [xa,ya,ra,xb,yb,rb] = v
    ab = math.sqrt((xb-xa)**2 + (yb-ya)**2)
    if ab > ra + rb:
        rst = 0
    elif ab + rb < ra:
        rst = 2
    elif ab + ra < rb:
        rst = -2
    else:
        rst = 1      
    return(rst)    

if __name__ == "__main__": 
    n = int(input())
    for i in range(n):
        v = list(map(float, input().split()))
        print(aux(v))

Python: import math

N = eval(input())
for _ in range(N):
	[Xa,Ya,Ra,Xb,Yb,Rb] = [float(element) for element in input().split()]
	distance = math.sqrt((Xa - Xb)**2 + (Ya - Yb)**2) # Compute distance from point A to point B
	if Ra - Rb > distance: # B in A
		print(2)
	elif Rb - Ra > distance: # A in B
		print(-2)
	elif Ra + Rb > distance: # Intersect
		print(1)
	else: # Not overlap
		print(0)

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

Python: from math import sqrt
num = int(input())
for _ in range(num):
    xa, ya, ra, xb, yb, rb = [float(el) for el in input().split(' ')]
    d = sqrt((xa-xb)**2 + (ya-yb)**2)
    if d < ra + rb:
        if ra > rb and d < ra - rb:
            print(2)
        elif rb > ra and d < rb -ra:
            print(-2)
        else:
            print(1)
    else:
        print(0)

Python: for _ in[0]*int(input()):
 x,y,r,s,t,u=map(float,input().split())
 d=((x-s)**2+(y-t)**2)**.5
 print([[[1,2][d<u-r],[1,2][d<r-u]][r>u],0][r+u<d])

Python: 
import math

N = eval(input())
for _ in range(N):
	[Xa,Ya,Ra,Xb,Yb,Rb] = [float(element) for element in input().split()]
	distance = math.sqrt((Xa - Xb)**2 + (Ya - Yb)**2) # Compute distance from point A to point B
	if Ra - Rb - distance > -10E-8: # B in A
		print(2)
	elif Rb - Ra - distance > -10E-8: # A in B
		print(-2)
	elif Ra + Rb - distance > -10E-8: # Intersect
		print(1)
	else: # Not overlap
		print(0)

Python: import math

n = int(input())

for _ in range(n):
    xa,ya,ra,xb,yb,rb = map(float, input().split())
    len=math.sqrt((xa-xb)**2+(ya-yb)**2)

    if len + rb <= ra:
        print("2")
    elif len <= ra + rb:
        print("1")
    else:
        print("0")

Python: 

import math


num = int(input())

for i in range(num):
    ax,ay,ar,bx,by,br = map(float,input().split(' '))
    d = (ax - bx)*(ax - bx) + (ay * by)
    if d < (br - ar):
            print(2)
    if d < (ar - br):
            print(-2)
    elif d <= (ar + br):
        print(1)
    else:
        print(0)

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)

Python: for _ in range(int(input())):
    xa, ya, ra, xb, yb, rb = list(map(float,input().split()))
    dAB = ((xa - xb) ** 2 + (ya - yb) ** 2) ** 0.5
    if ra + rb < dAB:
        print('0')
    elif dAB + rb < ra:
        print('2')
    elif dAB + ra < rb:
        print('-2')
    else:
        print('1')

Python: import math
for i in range(int(input())):
    xa, ya, ra, xb, yb, rb = list(map(float, input().split()))

    d1 = (xa - xb) ** 2 + (ya - yb) ** 2
    d2 = ra ** 2 + rb ** 2
    dr = (ra-rb) ** 2

    if d1 <= d2:
        if dr >= d1:
            print(2 if ra > rb else -2)
        else:
            print(1)
    else:
        print(0)