code/124 3진법.py

19 lines
149 B
Python
Raw Permalink Normal View History

2019-03-22 11:03:16 +00:00
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