import sys
import math
num=int(sys.stdin.readline())
for num in range(num):
x1, y1, r1, x2, y2, r2=map(int, sys.stdin.readline().split())
d=math.sqrt((x2-x1)**2+(y2-y1)**2)
if x1==x2 and y2==y1:
if r1==r2:
print(-1)
else:
print(0)
else:
if (d==r1+r2 or d==abs(r1-r2)):
print(1)
elif(d<r1+r2 and d>abs(r1-r2)):
print(2)
else:
print(0)
2022.05.08에 푼 문제..
'Algorithm' 카테고리의 다른 글
[python] 백준 1244번 : 스위치 켜고 끄기 (0) | 2023.05.19 |
---|---|
[python] 백준 1003 : 피보나치 함수 (0) | 2023.05.19 |
[python] 백준 1004번 : 어린 왕자 (1) | 2023.05.19 |
[python] 백준 1007번 : 벡터 매칭 (0) | 2023.05.19 |
[python] 백준 2563번: 색종이 (0) | 2023.01.15 |