20
分解一个数字!
您的任务是使用以下格式分解数字。 这与基本转换类似,不同之处在于digits,您列出了values,而不是在基本列表中列出,这样列表就加到了输入上。 如果给定的基为n,则列表中的每个数字都必须采用的形式k*(n**m),其中0<=k<n和m在整个列表中都是唯一的。 眼镜 任何合理的输入/输出格式。您的程序/功能需要2个输入并输出一个列表。 输出列表可以是任何顺序。 0 可以排除或包含。 0允许领导。 允许内置。 测试用例 number base converted list input1 input2 output 123456 10 [100000,20000,3000,400,50,6] or [6,50,400,3000,20000,100000] 11 2 [8,2,1] or [0,0,0,0,8,0,2,1] 727 20 [400,320,7] 101 10 [100,1] or [100,0,1] 计分 这是代码高尔夫球。以字节为单位的最短解决方案获胜。
16
code-golf
number
sequence
number-theory
base-conversion
code-golf
bitwise
hashing
code-golf
string
ascii-art
whitespace
code-golf
math
code-golf
code-golf
image-processing
counting
code-golf
math
arithmetic
checksum
code-golf
code-golf
math
arithmetic
number-theory
code-golf
array-manipulation
random
code-golf
string
code-golf
math
ascii-art
base-conversion
code-golf
graphical-output
geometry
3d
code-golf
math
linear-algebra
matrix
code-golf
math
number
sequence
code-golf
array-manipulation
code-golf
math
matrix
linear-algebra
code-golf
number
sequence
counting
code-golf
string
code-golf
string
restricted-source
quine
sorting
code-golf
string
geometry
code-golf
string
code-golf
networking
code-golf
base-conversion
code-golf
math
matrix
code-golf
arithmetic
linear-algebra
matrix
code-golf
number
arithmetic
grid
code-golf
number
source-layout
code-golf
string
bitwise
checksum
code-golf
array-manipulation
code-golf
string
probability-theory
code-golf
tips
code-golf
sequence
code-golf
string
math
sequence
calculus
code-golf
string
palindrome
bioinformatics
code-golf
math
combinatorics
counting
permutations
code-golf
parsing
logic-gates
code-golf
arithmetic
number-theory
combinatorics
code-golf
math
sequence
polynomials
integer
code-golf
string
ascii-art
chess
code-golf
string
code-golf
number
code-golf
string
ascii-art
parsing
code-golf
code-golf
number
natural-language
conversion
code-golf
arithmetic
code-golf
string
code-golf
ascii-art
decision-problem