Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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
- 오퍼레이팅시스템
- 코딩
- 정석학술정보관
- 그래프
- 컴공과
- 너비우선탐색
- 오에스
- 브루트포스
- Operating System
- cs
- 문제풀이
- DP
- vector
- 스택
- 자료구조
- coding
- 개발
- Computer science
- 코테
- 북리뷰
- c++
- 백준
- 구현
- 컴공
- bfs
- Stack
- 정석
- 컴퓨터공학과
- 알고리즘
- OS
Archives
- Today
- Total
Little Jay
[C++] 백준 2747번 피보나치 수 본문
간단한 피보나치 문제
재귀를 아마 못쓰는 문제인 것 같다
#include <iostream>
using namespace std;
int main() {
int first = 0;
int second = 1;
int input;
cin >> input;
for (int i = 1; i < input; i++) {
int third = first + second;
first = second;
second = third;
}
cout << second << "\n";
}
'알고리즘 > BOJ' 카테고리의 다른 글
| [C++] 백준 2908번 상수 (0) | 2021.03.01 |
|---|---|
| [C++] 백준 1267번 핸드폰 요금 (0) | 2021.02.28 |
| [C++] 백준 2693번 N번째 큰 수 (0) | 2021.02.28 |
| [C++] 백준 3507번 Automated Telephone Exchange (0) | 2021.02.27 |
| [C++] 백준 18108번 1998년생인 내가 태국에서는 2541년생?! (0) | 2021.02.27 |
Comments