Compare commits

...

2 Commits

Author SHA1 Message Date
Max Bradbury 3704179238 tidy up 2022-12-01 21:41:54 +00:00
Max Bradbury 48d2e0ab62 remove debug 2022-12-01 21:41:04 +00:00
1 changed files with 2 additions and 4 deletions

View File

@ -1,4 +1,4 @@
pub fn part_1(input: &String) -> String { pub fn part_1(input: &String) -> u64 {
let elves: Vec<&str> = input.split("\n\n").collect(); let elves: Vec<&str> = input.split("\n\n").collect();
let mut highest_calorie_count: u64 = 0; let mut highest_calorie_count: u64 = 0;
@ -15,7 +15,7 @@ pub fn part_1(input: &String) -> String {
} }
} }
format!("{highest_calorie_count}") highest_calorie_count
} }
pub fn part_2(input: &String) -> u64 { pub fn part_2(input: &String) -> u64 {
@ -28,7 +28,5 @@ pub fn part_2(input: &String) -> u64 {
let start = elf_calorie_counts.len() - 3; let start = elf_calorie_counts.len() - 3;
let top_3 = elf_calorie_counts.drain(start..); let top_3 = elf_calorie_counts.drain(start..);
println!("Top 3 elves: {:?}", top_3);
top_3.sum() top_3.sum()
} }