Skip to content

Commit

Permalink
Partial revert 'Optimize p37'
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Aug 29, 2024
1 parent a30cd57 commit 17ee019
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions rust/src/p0037.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub fn p0037() -> Answer {
if count == 11 {
break;
}
if p < 10 {
else if p < 10 {
continue;
}
let mut left = p;
Expand All @@ -37,7 +37,11 @@ pub fn p0037() -> Answer {
continue;
}
while is_prime(left) {
left %= 10u64.pow(left.ilog10());
let mut x = 10;
while x < left {
x *= 10;
}
left %= x / 10;
}
if left != 0 {
continue;
Expand Down

0 comments on commit 17ee019

Please sign in to comment.