链接
https://pintia.cn/problem-sets/994805342720868352/problems/994805487143337984
题解
不得不我深深的为
的短小精悍所折服
这题用
写至少30行,而用
8行就搞定了
代码
n, b = [int(x) for x in input().split()]
lis=[]
while n:
lis.append(str(n%b))
n//=b
if lis == lis[::-1]: print('Yes')
else: print('No')
print(*lis[::-1])