From f54a0279ce01c97651be9ea5597c5d672b34f049 Mon Sep 17 00:00:00 2001 From: Michael Manring Date: Tue, 26 Jul 2022 12:29:29 +0700 Subject: pwc175 solution in go - minor update --- challenge-175/pokgopun/go/ch-2.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/challenge-175/pokgopun/go/ch-2.go b/challenge-175/pokgopun/go/ch-2.go index 7e805c20b7..51106c56a2 100644 --- a/challenge-175/pokgopun/go/ch-2.go +++ b/challenge-175/pokgopun/go/ch-2.go @@ -21,12 +21,13 @@ import ( ) func main() { - p := totient.New() - cntdwn := 20 + var cntdwn uint = 20 + p := totient.New(cntdwn) var b strings.Builder - for i := uint(0); i < 10_000; i++ { + for i := uint(3); i < 200_000; i += 2 { if p.IsPerfect(i) { b.WriteString(", " + strconv.FormatUint(uint64(i), 10)) + //fmt.Println(i) cntdwn-- } if cntdwn == 0 { -- cgit