#lcm #multiple-values #calculate

lcmx

Calculate the least common multiple of multiple values

8 releases

0.1.7 Jun 2, 2024
0.1.6 Jun 2, 2024
0.1.4 Dec 11, 2023
0.1.3 Sep 3, 2023

#1 in #lcm

Download history 2/week @ 2024-08-31 5/week @ 2024-09-07 2/week @ 2024-09-14 38/week @ 2024-09-21 12/week @ 2024-09-28 2/week @ 2024-10-05 13/week @ 2024-10-12 2/week @ 2024-10-19 3/week @ 2024-10-26 6/week @ 2024-11-02 2/week @ 2024-11-09 6/week @ 2024-11-23 1/week @ 2024-11-30 71/week @ 2024-12-07 12/week @ 2024-12-14

90 downloads per month

MIT license

4KB
60 lines

lcmx-rs

Calculate the least common multiple of multiple values.

Rust

Example

use lcmx::lcmx;

fn main() {
    let v = vec![1, 2, 3, 4];
    let l = lcmx(&v).unwrap();
    println!("{}", l);
    assert_eq!(l, 12);
}

Dependencies

~4KB