aboutsummaryrefslogtreecommitdiff
path: root/2021/08/first.go
blob: d21fe678ee996e365bf925ea927012307354277b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package main

import (
	"bufio"
	"fmt"
	"os"
	"strings"
)

func main() {
	score := 0

	s := bufio.NewScanner(os.Stdin)
	for s.Scan() {
		inputs := strings.Split(s.Text(), " | ")
		output := strings.Split(inputs[1], " ")
		for _, v := range output {
			l := len(v)
			if l < 5 || l == 7 {
				score++
			}
		}
	}
	fmt.Println(score)
}