https://www.acmicpc.net/problem/11726
2x1 -> 1개
2x2 -> 2개
2x3 -> 3개
2x4 -> 5개
2x5 -> 8개
...
2xn -> 2x(n-2) + 2x(n-1)
#include <iostream>
using namespace std;
int main() {
int dp[1001];
dp[1] = 1;
dp[2] = 2;
int n;
cin >> n;
for (int i = 3; i <= n; i++) {
dp[i] = dp[i - 1] + dp[i - 2];
dp[i] = dp[i] % 10007;
}
cout << dp[n] << endl;
return 0;
}