728x90
import math
T=int(input())
for i in range(T):
x1,y1,r1,x2,y2,r2 = map(int,input().split())
distance = math.sqrt((x1-x2)**2 + (y1-y2)**2)
if distance==0 and r1==r2:
print(-1)
elif abs(r1-r2)==distance or r1+r2==distance:
print(1)
elif abs(r1-r2) < distance < (r1+r2) :
print(2)
else:
print(0)
728x90
'언어는 과-학인가요? > python 파이썬' 카테고리의 다른 글
(진짜재밌었음) 백준 골드 (1011번) 파이썬 - Fly me to the Alpha Centauri (0) | 2022.07.28 |
---|---|
백준 골드 (2448번) 파이썬 - 별찍기 (0) | 2022.07.28 |
백준 골드 (2447번) 파이썬 - 별찍기 (0) | 2022.07.27 |
백준 골드 (2493번) 파이썬 (0) | 2022.07.27 |
백준 2108 (0) | 2022.07.26 |