Trait nekolib::math::CommonQuot
source · pub trait CommonQuot {
type Output;
// Required method
fn common_quot(self) -> Self::Output;
}
Expand description
商が共通の区間の列挙。
以下の条件を満たす を の昇順に列挙する。
- ,
- , and
- .
Complexity
time, space.
Examples
use nekolib::math::CommonQuot;
assert_eq!(
60_u64.common_quot().collect::<Vec<_>>(),
[
(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8),
(9, 10), (11, 12), (13, 15), (16, 20), (21, 30), (31, 60)
]
);