From e25ae0ee13d955d5c91b8a7416df959ff3350af2 Mon Sep 17 00:00:00 2001 From: Nic Young Date: Wed, 13 May 2015 22:04:33 -0600 Subject: [PATCH] Total count being tracked --- stage_1/decrypt.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stage_1/decrypt.go b/stage_1/decrypt.go index d7b749a..26f2f6f 100644 --- a/stage_1/decrypt.go +++ b/stage_1/decrypt.go @@ -46,6 +46,7 @@ func main() { // iterate through each char adding char counts to the map counts := make(map[string]int) + total_count := 0 for i := 0; i < len(s)-1; i++ { letter := string(s[i]) @@ -70,7 +71,9 @@ func main() { if letter == string(',') { continue } + total_count += 1 counts[string(s[i])] += 1 } fmt.Println(counts) + fmt.Println(total_count) }