factorize verbosity fix
This commit is contained in:
parent
44e2a6876e
commit
8a69fa04d1
|
@ -19,11 +19,11 @@ pub fn prime_factors(mut n: u128, verbose: bool) -> Vec<u128> {
|
|||
else {
|
||||
n = n.checked_div(i).expect("n / i is not an integer");
|
||||
factors.push(i);
|
||||
}
|
||||
if verbose {
|
||||
println!("i={i}\t{:?}", factors);
|
||||
}
|
||||
}
|
||||
}
|
||||
if n > 1 {
|
||||
factors.push(n);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue