day 6 format fix

This commit is contained in:
Niklas Kapelle 2023-12-13 16:11:13 +01:00
parent 691b44d1e9
commit 6334f8f0a8
Signed by: niklas
GPG Key ID: 4EB651B36D841D16

View File

@ -8,8 +8,7 @@ fn parse_input(lines: &[String]) -> (Vec<u64>, Vec<u64>) {
}
fn distance_by_time_pressed(time_pressed: u64, race_time: u64) -> u64 {
let speed = (race_time - time_pressed);
return speed * time_pressed;
(race_time - time_pressed) * time_pressed
}
fn join_nums(nums: &[u64]) -> u64 {