← Home
For problem statement at 0-999/800-899/870-879/877/problemA.txt this is a correct solution, but verifier at 0-999/800-899/870-879/877/verifierA.go ends with All tests passed. can you fix the verifier? package main

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

func main() {
	in := bufio.NewReader(os.Stdin)
	var s string
	fmt.Fscan(in, &s)

	names := []string{"Danil", "Olya", "Slava", "Ann", "Nikita"}
	count := 0
	for _, name := range names {
		count += strings.Count(s, name)
	}

	if count == 1 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}