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 0e8508c commit 20ae048Copy full SHA for 20ae048
2022/day01/day01.go
@@ -21,8 +21,8 @@ func partOne(lines []string) {
21
}
22
23
func getElfMostCalories(elfMap map[string]int) (string, int) {
24
- var elf string = "1"
25
- var calories int = 0
+ var elf = "1"
+ var calories = 0
26
for key, value := range elfMap {
27
if value > calories {
28
calories = value
@@ -34,7 +34,7 @@ func getElfMostCalories(elfMap map[string]int) (string, int) {
34
35
func getAllocatedCaloriesPerElf(lines []string) map[string]int {
36
var elfCalories = make(map[string]int)
37
- var elfNumber int = 1
+ var elfNumber = 1
38
for _, stringCalories := range lines {
39
if stringCalories == "" {
40
elfNumber++
0 commit comments