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