Skip to content

Commit 0f50191

Browse files
committed
Lv3_멀리뛰기
1 parent 7818174 commit 0f50191

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#include <string>
2+
#include <vector>
3+
4+
using namespace std;
5+
6+
long long solution106(int n) {
7+
long long answer = 0;
8+
vector<long long> d(n+1,0);
9+
d[0] = 1;
10+
d[1] = 1;
11+
if (n > 1) {
12+
for (int i = 2; i <= n; i++)
13+
d[i] = (d[i - 1] + d[i - 2]) % 1234567;
14+
}
15+
return d[n];
16+
}

Programmers/Programmers.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
<ClCompile Include="Lv3\Lv3_단어변환.cpp" />
104104
<ClCompile Include="Lv3\Lv3_등굣길.cpp" />
105105
<ClCompile Include="Lv3\Lv3_디스크컨트롤러.cpp" />
106+
<ClCompile Include="Lv3\Lv3_멀리뛰기.cpp" />
106107
<ClCompile Include="Lv3\Lv3_방문길이.cpp" />
107108
<ClCompile Include="Lv3\Lv3_배달.cpp" />
108109
<ClCompile Include="Lv3\Lv3_베스트앨범.cpp" />

Programmers/Programmers.vcxproj.filters

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,5 +339,8 @@
339339
<ClCompile Include="Lv3\Lv3_캠핑.cpp">
340340
<Filter>소스 파일</Filter>
341341
</ClCompile>
342+
<ClCompile Include="Lv3\Lv3_멀리뛰기.cpp">
343+
<Filter>소스 파일</Filter>
344+
</ClCompile>
342345
</ItemGroup>
343346
</Project>

0 commit comments

Comments
 (0)