fn factorial_factors(s: &primal::Sieve, n: usize) -> Vec<(usize, usize)> {
    assert!(s.upper_bound() >= n);

    // Factorize component-wise and combine
    let mut factors = Vec::new();
    for i in 1..(n+1) {
        let ks = s.factor(i).unwrap();
        combine_factors(&mut factors, &ks);
    }

    factors
}
/// Compute all prime factors of the specified factorial
Compute all prime factors of the specified factorial
Compute all prime factors of the specified factorial
fn factorial_factors(s: &primal::Sieve, n: usize) -> Vec<(usize, usize)> {
    assert!(s.upper_bound() >= n);
    // Factorize component-wise and combine
    let mut factors = Vec::new();
    for i in 1..(n+1) {
        let ks = s.factor(i).unwrap();
        combine_factors(&mut factors, &ks);
    }
    factors
}
fn factorial_factors ( s : & primal :: Sieve , n : usize ) -> Vec < ( usize , usize ) > { assert ! ( s upper_bound ( ) n ) ; // Factorize component-wise and combine let mut factors = Vec :: new ( ) ; for i in 1 .. ( n + 1 ) { let ks = s . factor ( i ) . unwrap ( ) ; combine_factors ( & mut factors , & ks ) ; } factors }
Compute all prime factors of the specified factorial
Compute all prime factors of the specified factorial
s
&primal::Sieve
n
usize