factorList

xの素因数一覧を返す

T[]
factorList
(
T
)
(
T x
)

Examples

1 import std.range, std.algorithm;
2 assert(equal(factorList(1), new int[0]));
3 assert(equal(factorList(2), [2]));
4 assert(equal(factorList(4), [2, 2]));
5 assert(equal(factorList(24), [2, 2, 2, 3]));

Meta