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: 

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 < abs(br - ar):
        if ar > br:
            print(2)
        else:
            print(-2)
    elif d <= ar + br:
        print(1)
    else:
        print(0)

Python: import math

n = int(input())
for i in range(0,n):
    x1,y1,r1,x2,y2,r2 = (float(x) for x in input().split())
    ans = 1
    # Bが Aの中にあるとき2、
    # AがBの中にあるとき-2、
    # AとBが共有点をもつとき1、
    # AとBが重なっていないとき0
    # 円の中心からの距離
    l = math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1))
    if l < abs(r1 - r2):
        if r1 > r2:
            ans = 2
        elif r2 > r1:
            ans = -2
    if l > r1 + r2:
        ans = 0
    print(ans)

Python: from decimal import Decimal

def dist(x1, y1, x2, y2):
    return ((x1 - x2)**2 + (y1 - y2)**2)**Decimal('0.5')

N = int(raw_input())
while (N):
    N -= 1
    xa, ya, ra, xb, yb, rb = map(Decimal, raw_input().split())
    d = dist(xa, ya, xb, yb)
    if d + rb < ra:
        s = 2
    elif d + ra < rb:
        s = -2
    elif d < ra + rb:
        s = 1
    else:
        s = 0
    print

Python: import sys

def solve(circleA, circleB):
    xa, ya, ra = circleA
    xb, yb, rb = circleB
    # ?????????????????????????????????????????´????????????
    if ra <= rb:
        if distancePow2(xa, ya, xb, yb) < pow(rb - ra, 2):
            return -2
    else:
        if distancePow2(xa, ya, xb, yb) < pow(rb - ra, 2):
            return 2

    # ??±???????????????????????????
    if pow(rb - ra, 2) <= distancePow2(xa, ya, xb, yb) <= pow(rb + ra, 2):
        return 1

    return 0

def distancePow2(xa, ya, xb, yb):
    return pow(xb - xa, 2) + pow(yb - ya, 2)

n = int(input())
for i in range(0, n):
    inStr = input()
    circleAInfo = [float(data) for data in inStr.split(" ")[0:3]]
    circleBInfo = [float(data) for data in inStr.split(" ")[3:6]]
    print(solve(circleAInfo, circleBInfo))

Python: n = int(input())
for i in range(n):
    k = input()
    xa, ya, ra, xb, yb, rb = list(map(float, k.split(" ")))
    d = abs(complex(xb-xa, yb-ya))
    if ra + rb < d:
        print("0")
    elif abs(rb-ra) <= d <= ra+rb:
        print("1")
    else:
        print("2" if ra > rb else "-2")

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: n = input()
for i in range(int(n)):
    xa, ya, ra, xb, rb, yb = list(map(float, input().split(" ")))
    d = abs(complex(xb-xa, yb-ya))
    if ra + rb < d:
        print("0")
    elif abs(rb-ra) <= d <= ra+rb:
        print("1")
    elif d < abs(ra-rb):
        print("2" if ra > rb else "-2")

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

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

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 + 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)

Python: import sys
import math

n = int(input())

for _ in range(n):
    xa, ya, ra, xb, yb, rb = map(float, input().split())

    distance = math.sqrt((xa-xb)**2 + (ya-yb)**2)
    if ra + rb > distance:
        if (ra < rb and distance + ra < rb):
            print(-2)
        elif (rb < ra and distance + rb < ra):
            print(2)
        else:
            print(1)
    else:
        print(0)

Python: for i in range(int(input())):
    xa, ya, ra, xb, yb, rb = map(float, input().split(' '))
    ab_length = ((xa - xb) ** 2 + (ya - yb) ** 2) ** 0.5
    if ra > rb:
        max_r, min_r, min_c = ra, rb, 2
    else:
        max_r, min_r, min_c = rb, ra, -2

    if ab_length > ra + rb:
        ans = 0
    elif ab_length <= ra + rb:
        if ab_length + min_r < max_r:
            ans = min_c
        else:
            ans = 1
    print(ans)

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

Python: def f():
    ax,ay,ar,bx,by,br=map(float,input().split())
    d=((ax-bx)* (ax - bx))+((ay-by)*(ay-by))
    r1=(ar+br)*(ar+br)
    r2=(ar-br)*(ar-br)
    if d<=r1 and d>=r2:return 1;
    elif d<r2 and ar>=br:return 2
    elif d < r2 and ar <= br:return -2
    else:return 0

for _ in range(int(input())):print(f())

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 < (ar - br):
            print(2)
    if d < (br - ar):
            print(-2)
    elif d <= (ar + br):
        print(1)
    else:
        print(0)

Python: def dist(P, Q):
    return ((P[0] - Q[0]) ** 2 + (P[1] - Q[1]) ** 2) ** 0.5

n = int(input())
for _ in range(n):
    xa, ya, ra, xb, yb, rb = map(float, input().split())
    A, B = (xa, ya), (xb, yb)
    if dist(A, B) > ra + rb:
        print(0)
    elif dist(A, B) + ra < rb:
        print(-2)
    elif dist(A, B) + rb < ra:
        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)