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 <= r1 + r2:
        print(1)
    else:
        print(0)

Python: import math

def check_intersect(x1,y1,r1,x2,y2,r2):
    d = math.sqrt((x2-x1)**2 + (y2-y1)**2)    

    if r1 < r2 and d + r1 <= r2:
        print(-2)
    elif r1 > r2 and d + r2 <= r1:
        print(2)
    elif d > r1+r2:
        print(0)
    elif d <= r1+r2:
        print(1)
    return 0

n = int(input())
for i in range(n):
    x1,y1,r1,x2,y2,r2 = map(float,input().split())
    check_intersect(x1,y1,r1,x2,y2,r2)

Python: from math import hypot

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

Python: n = int(input())
for i in range(n):
    xa,ya,ra,xb,yb,rb = map(float,input().split())
    if 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")
    else:
        print("0")

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)

Python: while True:
    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")

Python: # coding=utf-8
import math


def square(number: float) -> float:
    return number * number


if __name__ == '__main__':
    N = int(input())
    for i in range(N):
        xa, ya, ra, xb, yb, rb = map(float, input().split())
        distance = math.sqrt(square(xb - xa) + square(yb - ya))
        if distance > (ra + rb):
            print(0)
        elif distance >= math.fabs(ra - rb):
            print(1)
        elif distance < math.fabs(ra - rb):
            if ra > rb:
                print(2)
            elif ra < rb:
                print(1)
        else:
            pass

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

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

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: n = int(input())

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

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

import sys
import os
import math


N = int(input())

for i in range(N):
    ax, ay, ar, bx, by, br = map(float, input().split())

    between_center = math.sqrt( (ax-bx)**2 + (ay-by)**2 )

    # ????????£????????????
    if between_center > ar + br:
        print(0)

    # ????????????????????¨
    else:
        # B in A
        if ar > between_center + br:
            print(2)

        # A in B
        elif br > between_center + ar:
            print(-2)

        else:
            print(1)

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 distance < ra + rb:
        if (ra < rb and distance + ra < rb) or (ra > rb and distance + rb  < ra):
            if ra < rb:
                print("-2")
            else:
                print("2")
        else:
            print("1")
    else:
        print("0")

Python: 
import sys,math
cases = int(input())
i = 0
while i < cases:
   for line in sys.stdin.readlines():
       xa , ya , ra , xb , yb , rb = map(float,line.split())
       dist = (yb - ya)*(yb - ya) + (xb - xa)*(xb - xa)
       dist = math.sqrt(dist)
       print(dist)
       if (ra < rb and dist == 0):
           print("-2")
       elif (rb < ra and dist == 0):
           print("2")
       elif dist < ra + rb:
           print("1")
       elif dist > ra + rb :
           print("0")
   i += 1

Python: # Aizu Problem 0023: Circles Intersection
#
import sys, math, os

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")


def check_circles(xa, ya, ra, xb, yb, rb):
    dist = math.sqrt((xa - xb)**2 + (ya - yb)**2)
    if dist > ra + rb:
        return 0
    if ra > rb and dist < ra - rb:
        return 2
    if rb > ra and dist < rb - ra:
        return -2
    return 1
    
N = int(input())
for n in range(N):
    xa, ya, ra, xb, yb, rb = [float(_) for _ in input().split()]
    print(check_circles(xa, ya, ra, xb, yb, rb))

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