주하진이 매우 괜찮은 깨달음을 얻는 과정 Vol.1

This commit is contained in:
2020-04-29 20:23:12 +09:00
parent 0241857690
commit a4366d0b35
5 changed files with 62 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
T = int(input())
for i in range(T):
x1, y1, r1, x2, y2, r2 = map(int, input().split())
dist:int = (x1-x2)**2 + (y1- y2)**2
distR:int = (r1+r2)**2
if dist == 0 and r1 == r2:
print(-1)
elif dist < (r1-r2)**2:
print(0)
elif dist == (r1-r2)**2:
print(1)
elif dist > distR:
print(0)
elif dist < distR:
print(2)
elif dist == distR:
print(1)