|
@@ -37,7 +37,7 @@ pub fn main() {
|
|
|
|
|
|
let mut sum = 0;
|
|
|
for c in 124075..580769+1 {
|
|
|
- if let Some(valid_c) = part_1(c) {
|
|
|
+ if let Some(_valid_c) = part_1(c) {
|
|
|
// println!("{}", valid_c);
|
|
|
sum +=1;
|
|
|
}
|
|
@@ -45,10 +45,11 @@ pub fn main() {
|
|
|
println!("part one sum {}", sum);
|
|
|
|
|
|
|
|
|
+ // Part 2 is Part 1 plus one additional check
|
|
|
let mut sum = 0;
|
|
|
for c in 124075..580769+1 {
|
|
|
- if let Some(valid_c) = part_1(c) {
|
|
|
- if let Some(second_c) = part_2(c) {
|
|
|
+ if let Some(_valid_c) = part_1(c) {
|
|
|
+ if let Some(_second_c) = part_2(c) {
|
|
|
sum +=1;
|
|
|
}
|
|
|
}
|