day 9 part 2

main
Andy Teijelo 2023-12-09 11:27:09 -05:00
parent 592d4fe2c2
commit 157915cae5
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ fn main() -> Result<()> {
}
let mut prediction = 0;
for seq in sequences.iter().rev() {
prediction += seq.last().unwrap();
prediction = seq.first().unwrap() - prediction;
}
println!("{prediction}");
sum += prediction;