1003번: 피보나치 함수
python
fibos = [0, 1]
def get_fibo(n):
try:
return fibos[n]
except IndexError:
temp = get_fibo(n - 1) + get_fibo(n - 2)
fibos.append(temp)
return temp
T = int(input())
for _ in range(T):
N = int(input())
if N == 0:
print(1, 0)
else:
print(get_fibo(N - 1), get_fibo(N))