Introduction
Everyone knows the FizzBuzz sequence. It goes something like this:
1 2 Fizz 4 Buzz Fizz 7 8 Fizz Buzz 11 Fizz 13 14 FizzBuzz . . . In case you don't know, if the number is divisible by 3, it's Fizz. If it is divisible by 5, it's Buzz. If it is divisible by both, it's FizzBuzz. If it is not divisible by both, it's just the original number.
Task
Take two inputs, for example (space separated here)
Fizz 3 For this specific example input, you should output 9, the third Fizz. To be more general, take a word and a number, output the numberth word.
The word input may be Number, and in this case, you should output the numberth number in the FizzBuzz sequence that is not Fizz, Buzz, or FizzBuzz.
You may choose any 4 distinct, consistent inputs representing Fizz, Buzz, FizzBuzz and Number.
Test Cases
Fizz 3 => 9 Buzz 4 => 25 FizzBuzz 2 => 30 Number 312 => 584 Scoring
Shortest code wins!
Rules
- No standard loopholes.
Number 312might be584. \$\endgroup\$