From 778220b2e3ce662e733727fb9a560fcfe85c19eb Mon Sep 17 00:00:00 2001 From: Adrien Hopkins Date: Wed, 30 Aug 2023 13:53:53 -0500 Subject: Add digit map calculation This is not in the output yet, but it will be soon - printing it is another task since I want colours in my output. --- factors/factorize.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'factors/factorize.go') diff --git a/factors/factorize.go b/factors/factorize.go index 2f7368a..8e82b16 100644 --- a/factors/factorize.go +++ b/factors/factorize.go @@ -11,14 +11,14 @@ func Factors(n uint) []uint { factors := []uint{1} for p, e := range primeFactorization.exponents { - next_factors := make([]uint, 0, len(factors) * int(e)) + next_factors := make([]uint, 0, len(factors)*int(e)) for _, factor := range factors { for i := uint(0); i <= e; i++ { multiplier := uint(1) for j := uint(0); j < i; j++ { multiplier *= p } - next_factors = append(next_factors, factor * multiplier) + next_factors = append(next_factors, factor*multiplier) } } factors = next_factors -- cgit v1.2.3