Compare commits
2 Commits
907c7307ac
...
3704179238
Author | SHA1 | Date |
---|---|---|
Max Bradbury | 3704179238 | |
Max Bradbury | 48d2e0ab62 |
|
@ -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 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 {
|
||||
|
@ -28,7 +28,5 @@ pub fn part_2(input: &String) -> u64 {
|
|||
let start = elf_calorie_counts.len() - 3;
|
||||
let top_3 = elf_calorie_counts.drain(start..);
|
||||
|
||||
println!("Top 3 elves: {:?}", top_3);
|
||||
|
||||
top_3.sum()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue