일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 배열
- 객체
- element 조회
- jQuery
- 함수
- sql injection
- xss game 풀이
- github
- 포인터
- window
- 자바스크립트
- IF문
- suninatas 풀이
- Pwndbg
- htmlspecialchars
- 조건문
- 사칙연산
- document
- 메소드
- lord of sql injection
- property
- blind sql injection
- object
- 백준 파이썬
- 백준 알고리즘
- 파이썬
- python
- 김성엽 대표님
- xss game
- burp suite
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