Problem 3712 · Easy
Count each value once, then add every occurrence of the values whose count is a multiple of k.
Open the interactive visualisation