diff --git a/src/main.rs b/src/main.rs index ad66668..1eaea06 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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;