Skip to content

Commit

Permalink
fix compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Aug 23, 2024
1 parent e30bb0c commit d23425a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion rust/src/include/primes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use std::hash::Hash;
use std::ops::{Add,Div,Mul,Rem};

use num_traits::{one,zero,One,Zero};
use itertools::Itertools;

pub struct Eratosthenes<I>
where I: Hash
Expand Down
4 changes: 2 additions & 2 deletions rust/src/p0012.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ We can see that 28 is the first triangle number to have over five divisors.
What is the value of the first triangle number to have over five hundred
divisors?
*/
use crate::include::primes;
use crate::include::factors;
use crate::include::utils::Answer;

pub fn p0012() -> Answer {
let mut num: u64 = 0;
for x in 1.. {
num += x;
if primes::proper_divisors(num).len() > 500 {
if factors::proper_divisors(num).collect::<Vec<u64>>().len() > 500 {
return Answer::Int(num.into());
}
}
Expand Down

0 comments on commit d23425a

Please sign in to comment.