주하진이 매우 괜찮은 깨달음을 얻는 과정 Vol.1
This commit is contained in:
17
zeta_python/completed/1002.py
Normal file
17
zeta_python/completed/1002.py
Normal 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)
|
||||||
9
zeta_python/completed/10870.py
Normal file
9
zeta_python/completed/10870.py
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
def fib(n):
|
||||||
|
if not n:
|
||||||
|
return 0
|
||||||
|
elif n == 1:
|
||||||
|
return 1
|
||||||
|
else:
|
||||||
|
return fib(n-1) + fib(n-2)
|
||||||
|
|
||||||
|
print(fib(int(input())))
|
||||||
11
zeta_python/completed/2231.py
Normal file
11
zeta_python/completed/2231.py
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
N = int(input())
|
||||||
|
|
||||||
|
def seps(n):
|
||||||
|
return n + sum(map(int, str(n)))
|
||||||
|
|
||||||
|
for i in range(1 if N < 101 else N-100, N):
|
||||||
|
if seps(i) == N:
|
||||||
|
print(i)
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
print(0)
|
||||||
15
zeta_python/completed/3009.py
Normal file
15
zeta_python/completed/3009.py
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
A =[list(map(int, input().split())) for i in range(3)]
|
||||||
|
|
||||||
|
if A[0][0] == A[1][0]:
|
||||||
|
print(A[2][0], end=" ")
|
||||||
|
elif A[1][0] == A[2][0]:
|
||||||
|
print(A[0][0], end=" ")
|
||||||
|
else:
|
||||||
|
print(A[1][0], end=" ")
|
||||||
|
|
||||||
|
if A[0][1] == A[1][1]:
|
||||||
|
print(A[2][1], end="")
|
||||||
|
elif A[1][1] == A[2][1]:
|
||||||
|
print(A[0][1], end="")
|
||||||
|
else:
|
||||||
|
print(A[1][1], end="")
|
||||||
10
zeta_python/completed/4153.py
Normal file
10
zeta_python/completed/4153.py
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
I = list(map(int, input().split()))
|
||||||
|
while I[0] != 0:
|
||||||
|
I.sort()
|
||||||
|
if I[0] ** 2 + I[1] ** 2 == I[2] ** 2:
|
||||||
|
print("right")
|
||||||
|
else:
|
||||||
|
print("wrong")
|
||||||
|
|
||||||
|
|
||||||
|
I = list(map(int, input().split()))
|
||||||
Reference in New Issue
Block a user