Trains the technique from
LeetCode 412Fizz BuzzThis is an original problem, written from a brief that listed the technique, the difficulty, the topics, the function shape and the input bounds — none of that problem's wording, examples, hints or editorials. The link is there so you can map your practice onto the standard set.
Same function shape, different story and different numbers.
A drum teacher runs a counting drill. The class counts beats out loud from 1 up to beats, but two beat families get a spoken cue instead of a number:
3 is called as "Tap"5 is called as "Thud""TapThud"Return the list of callouts for the whole drill, one string per beat, in beat order. The returned list has exactly beats entries and the entry at position i describes beat i + 1.
Example 1
Only beat 3 lands on a cue family, so the other three beats are spoken as plain numbers.
Example 2
Beat 15 belongs to both families, so its callout joins the two cues in that order; beats 6, 9 and 12 take the first cue and beat 10 takes the second.
Example 3
A one-beat drill produces a single callout, the number itself.
The editor is preloaded with this. It matches the parent problem's shape, so a solution that works here transfers to a judge unchanged.
def drum_labels(beats: int) -> list[str]:public List<String> drumLabels(int beats)See the step-by-step animation, the intuition, and clean code in every language — free, no credit card.