MCPcopy Create free account
hub / github.com/E869120/math-algorithm-book / main

Function main

codes/cpp/Code_3_07_2.cpp:6–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4int N, dp[54];
5
6int main() {
7 // ����
8 cin >> N;
9
10 // ���I�v��@ �� �����̏o��
11 for (int i = 0; i <= N; i++) {
12 if (i <= 1) dp[i] = 1;
13 else dp[i] = dp[i - 1] + dp[i - 2];
14 }
15 cout << dp[N] << endl;
16 return 0;
17}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected