일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
Tags
- 스위핑 알고리즘
- ROP
- 이진 탐색
- 수학
- 다이나믹 프로그래밍
- 문자열 처리
- BOF
- 완전 탐색
- 이분 탐색
- 스택
- fsb
- DFS
- 분할 정복
- syscall
- heap
- RTL
- 큐
- 브루트 포스
- tcache
- 동적 계획법
- OOB
- 포맷스트링버그
- off by one
- 투 포인터
- 에라토스테네스의 체
- 이진트리
- 연결리스트
- House of Orange
- BFS
- 백트래킹
Archives
- Today
- Total
SDJ( 수돈재 아님 ㅎ )
[C++] 2748 - 피보나치 수 2 본문
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<utility>
#define endl '\n'
using namespace std;
long long int fibo[95] = {0, 1, 1};
int main(void)
{
int n;
cin >> n;
for(int i = 3; i < 93; ++i)
fibo[i] = fibo[i-1] + fibo[i-2];
cout << fibo[n] << endl;
return 0;
}
|
'알고리즘 > Backjoon' 카테고리의 다른 글
[C++] 1003 - 피보나치 함수 (0) | 2019.12.04 |
---|---|
[C] 3085 - 사탕 게임 (0) | 2019.12.04 |
[C] 13240 - Chessboard (0) | 2019.12.03 |
[C] 13241 - 최소공배수 (0) | 2019.12.03 |
[C++] 1065 - 한수 (0) | 2019.11.24 |
Comments