From 20b364bda743e756b09504eb0ddedf7be5302080 Mon Sep 17 00:00:00 2001 From: letsjo Date: Mon, 10 Apr 2023 23:16:41 +0900 Subject: [PATCH] =?UTF-8?q?[#12]=20Feat:=20Add=20=ED=95=98=EB=85=B8?= =?UTF-8?q?=EC=9D=B4=20=ED=83=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 1914.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 1914.py diff --git a/1914.py b/1914.py new file mode 100644 index 0000000..23468ba --- /dev/null +++ b/1914.py @@ -0,0 +1,18 @@ +# ν•˜λ…Έμ΄ 탑 + +def move(n, start, target): + if n > 1: + move(n-1, start, 6-start-target) + + print(start, target) + + if n > 1: + move(n-1, 6-start-target, target) + + +N = int(input()) + +print(2**N-1) + +if (N <= 20): + move(N, 1, 3)