题解 | #小乐乐与进制转换#
小乐乐与进制转换
http://www.nowcoder.com/practice/242eafef2a704c0ca130d563b7b3ee2d
BC95 小乐乐与进制转换
思路:
step1:倒序排列余数法;
代码如下:
n = int(input())
c = []
while n != 0:
x = n%6
c.append(x)
n = n//6
c = c[::-1]
for i in c:
print(i,end='')