mirror of
https://github.com/bertptrs/adventofcode.git
synced 2025-12-25 12:50:32 +01:00
One pointless index removed
This commit is contained in:
@@ -171,8 +171,8 @@ func main() {
|
|||||||
sizes := compute_group_sizes(groups, len(points))
|
sizes := compute_group_sizes(groups, len(points))
|
||||||
|
|
||||||
product := 1
|
product := 1
|
||||||
for i := len(sizes) - 3; i < len(sizes); i += 1 {
|
for _, size := range sizes[len(sizes)-3:] {
|
||||||
product *= sizes[i]
|
product *= size
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Printf("Part 1: %v\n", product)
|
fmt.Printf("Part 1: %v\n", product)
|
||||||
|
|||||||
Reference in New Issue
Block a user