Skip to content

Commit 09acdbe

Browse files
authored
[20251024] PGM / LV2 / 피보나치 수 / 이인희
1 parent ae5a4d5 commit 09acdbe

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
```java
2+
class Solution {
3+
public int solution(int n) {
4+
return pibo(n);
5+
}
6+
public static int pibo(int n){
7+
if(n == 0)
8+
return 0;
9+
else if(n == 1)
10+
return 1;
11+
return pibo(n-1) + pibo(n-2);
12+
}
13+
}
14+
```

0 commit comments

Comments
 (0)