일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 메소드
- 사칙연산
- suninatas 풀이
- Pwndbg
- object
- 조건문
- 함수
- python
- 김성엽 대표님
- blind sql injection
- 배열
- 백준 알고리즘
- 포인터
- xss game
- document
- xss game 풀이
- htmlspecialchars
- sql injection
- jQuery
- burp suite
- 백준 파이썬
- 파이썬
- window
- lord of sql injection
- 자바스크립트
- property
- IF문
- github
- element 조회
- 객체
Archives
- Today
- Total
power-girl0-0
하노이의 탑 본문
728x90
def hanoi(ndisks, startPeg=1, endPeg=3):
if ndisks:
hanoi(ndisks-1, startPeg, 6-startPeg-endPeg)
print(startPeg, "번의 기둥의", ndisks, "번 고리를", endPeg, "번 기둥에 옮깁니다.")
hanoi(ndisks-1, 6-startPeg-endPeg, endPeg)
hanoi(ndisks=3)
728x90
'언어 > Python' 카테고리의 다른 글
Python 개요 (0) | 2020.12.16 |
---|---|
성적입력받아 최대값과 최소값 차이 구하기 (0) | 2020.12.02 |
사칙연산 (0) | 2020.10.06 |
사각형의 넓이 구하기 (0) | 2020.10.06 |
함수 실습 (0) | 2020.10.06 |
Comments