#multiple-values #lcm #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-09-01 5/week @ 2024-09-08 2/week @ 2024-09-15 41/week @ 2024-09-22 10/week @ 2024-09-29 1/week @ 2024-10-06 15/week @ 2024-10-13

67 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