1
0
This commit is contained in:
2024-12-02 19:13:13 +01:00
parent df7b7ae445
commit 48f9790c5e
2 changed files with 2 additions and 5 deletions

View File

@@ -15,10 +15,7 @@ fn part1(input: &str) -> Int {
l.sort();
r.sort();
l.into_iter()
.zip(r.into_iter())
.map(|(l, r)| (l - r).abs())
.sum()
l.into_iter().zip(r).map(|(l, r)| (l - r).abs()).sum()
}
fn part2(input: &str) -> Int {

View File

@@ -1,4 +1,4 @@
use std::{default, fs::read_to_string};
use std::fs::read_to_string;
use itertools::Itertools;