Skip to content

Conversation

@aiden0413
Copy link
Collaborator

@aiden0413 aiden0413 commented Oct 30, 2025

링크

코드1의 실행횟수는 피보나치 수의 n번째 수이고 binet공식을 통해 피보나치 n번째 수를 구하였습니다.

$$F_{n}=\frac{1}{\sqrt{5}}\left(\left(\frac{1+\sqrt{5}}{2}\right)^{n}-\left(\frac{1-\sqrt{5}}{2}\right)^{n}\right)$$

코드2의 실행횟수는 n은 3~n까지 반복문이 실행되므로 n-2가 나왔습니다

2번째는 cahce를 이용해서 풀었고, 3번째는 dp로 풀었습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants