From 8fac4a05319438e5da3685337c8569b15eff353b Mon Sep 17 00:00:00 2001 From: gyubo Date: Fri, 22 Mar 2019 20:03:16 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B6=94=EA=B0=80=20'124=203=EC=A7=84=EB=B2=95?= =?UTF-8?q?.py'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 124 3진법.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 124 3진법.py diff --git a/124 3진법.py b/124 3진법.py new file mode 100644 index 0000000..5efc6e5 --- /dev/null +++ b/124 3진법.py @@ -0,0 +1,18 @@ +b=int(input('hah')) +f=0 +h='' +while b>0: + f = b%3 + b= b//3 + if f==0: + f=4 + b=b-1 + h=str(f)+h +print(h) + + + + +# if b==3 +# b=4 +