divisorList

xの約数一覧を返す

T[]
divisorList
(
T
)
(
T x
)

Examples

1 import std.range, std.algorithm;
2 assert(equal(divisorList(1), [1]));
3 assert(equal(divisorList(2), [1, 2]));
4 assert(equal(divisorList(4), [1, 2, 4]));
5 assert(equal(divisorList(24), [1, 2, 3, 4, 6, 8, 12, 24]));

Meta