Go: package main

import (
	"fmt"
	"math"
)

func main() {
	var n int
	fmt.Scan(&n)
	for i := 0; i < n; i++ {
		var xa, ya, ra, xb, yb, rb float64
		fmt.Scan(&xa, &ya, &ra, &xb, &yb, &rb)
		distance := math.Sqrt((xb-xa)*(xb-xa) + (yb-ya)*(yb-ya))
		if rb+distance < ra {
			fmt.Println(2)
		} else if ra+distance < rb {
			fmt.Println(-2)
		} else if rb+ra >= distance {
			fmt.Println(1)
		} else {
			fmt.Println(0)
		}
	}
}

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

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