We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 386fa49 commit edafb94Copy full SHA for edafb94
2022/Day01/Solution.cs
@@ -12,6 +12,8 @@ public object PartOne(string input) =>
12
public object PartTwo(string input) =>
13
GetCaloriesPerElf(input).Take(3).Sum();
14
15
+ // Returns the calories carried by the elves in descending
16
+ // order.
17
private IEnumerable<int> GetCaloriesPerElf(string input) =>
18
from elf in input.Split("\n\n")
19
let calories = elf.Split('\n').Select(int.Parse).Sum()
0 commit comments