We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10502c4 commit 3340ee5Copy full SHA for 3340ee5
src/solutions/day08.rs
@@ -1,6 +1,6 @@
1
use crate::data::load;
2
use lazy_static::lazy_static;
3
-use num::Integer;
+use num::integer::div_floor;
4
use regex::Regex;
5
use std::collections::hash_map::Entry;
6
use std::collections::{HashMap, HashSet};
@@ -197,7 +197,7 @@ fn make_state_map(
197
fn lcm(a: Vec<u64>) -> u64 {
198
let mut lcm = a[0];
199
for i in a.iter() {
200
- lcm = (lcm * *i).div_floor(&num::integer::gcd(lcm, *i));
+ lcm = div_floor(lcm * *i, num::integer::gcd(lcm, *i));
201
}
202
lcm
203
0 commit comments