class Solution { static int answer = 0; public long solution(int n) { int[] dp=new int[n+2]; dp[1]=1; dp[2]=2; for (int i = 3; i 총 칸방법 수방법 예시11(1)22(1 + 1), (2)33(1 + 1 + 1), (1 + 2), (2 + 1)45(1 + 1 + 1 + 1), (1 + 1 + 2),(2 + 2), (2 + 1 + 1), (1 + 2 + 1)표의 규칙성을 따라서 dp[i]=dp[i-1]+dp[i-2]임을 알 수 있다. 참고: https://hstory0208.tistory.com/entry/Java자바-프로그래머스-Lv2-멀리-뛰기D..