구하고자 하는 대상의 위치를 k,l이라고 하면
((x1-k)**2 + (y1-l)**2)**(1/2)
== r1
((x2-k)**2 + (y2-l)**2)**(1/2)
== r2
여기서 가능한 k,l을 모두 구하는건데..
((x1-k)**2 + (y1-l)**2)== r1**2
((x2-k)**2 + (y2-l)**2)== r2**2
t=int(input())
for i in range(t) :
x1, y1, r1, x2, y2, r2 = map(int, input().split())
distanceOfcenter = ((x1-x2)**2 + (y1-y2)**2)**(1/2)
if distanceOfcenter == 0 and r1==r2 :
print(-1)
elif abs(r1-r2)<distanceOfcenter < r1+r2:#앞에 r1-r2 절댓값보다 커야한다는 조건있어야 ㅇ
print(2)
elif distanceOfcenter == r1+r2 or distanceOfcenter==abs(r1-r2) :
print(1)
elif distanceOfcenter > r1+r2 or distanceOfcenter<abs(r1-r2) :
print(0)
출처 : 출처
t=int(input())
for i in range(t) :
x1, y1, r1, x2, y2, r2 = map(int, input().split())
distanceOfcenter = ((x1-x2)**2 + (y1-y2)**2)**(1/2)
if distanceOfcenter == 0 and r1==r2 :
print(-1)
elif abs(r1-r2)<distanceOfcenter < r1+r2:#앞에 r1-r2 절댓값보다 커야한다는 조건있어야 ㅇ
print(2)
elif distanceOfcenter == r1+r2 or distanceOfcenter==abs(r1-r2) :
print(1)
elif distanceOfcenter > r1+r2 or distanceOfcenter<abs(r1-r2) :
print(0)