[ALPS Study] ์์ ํ์ - ํ๋
ธ์ดํ, ๋ธ๋์ญ
- BOJ 11729 ํ๋
ธ์ดํ #define _CRT_SECURE_NO_WARNINGS #include void hanoi(int n, int start, int mid, int end); int cnt = 0; int main() { int n; int start = 1, mid = 2, end = 3; //printf("์ํ์ ๊ฐ์๋ฅผ ์
๋ ฅํ์ธ์ : "); scanf("%d", &n); hanoi(n, start, mid, end); printf("%d\n", cnt); return 0; } void hanoi(int n, int start, int mid, int end) { if (n == 1) { cnt++; printf("%d %d\n", start, end); } else { hanoi(n -..