← Home
For problem statement at 0-999/0-99/40-49/43/problemA.txt this is a correct solution, but verifier at 0-999/0-99/40-49/43/verifierA.go ends with All tests passed can you fix the verifier? package main

import (
	"fmt"
)

func main() {
	var n int
	fmt.Scan(&n)

	counts := make(map[string]int)
	var team string
	for i := 0; i < n; i++ {
		fmt.Scan(&team)
		counts[team]++
	}

	var winner string
	var maxGoals int
	for t, c := range counts {
		if c > maxGoals {
			maxGoals = c
			winner = t
		}
	}

	fmt.Println(winner)
}