6 kyu
FizzBuzz Backwards
571 of 1,109marbiru
Description:
Traditionally in FizzBuzz, multiples of 3 are replaced by "Fizz" and multiples of 5 are replaced by "Buzz". But we could also play FizzBuzz with any other integer pair [n, m]
whose multiples are replaced with Fizz and Buzz.
For a sequence of numbers, Fizzes, Buzzes and FizzBuzzes, find the numbers whose multiples are being replaced by Fizz and Buzz. Return them as an array [n, m]
The Fizz and Buzz numbers will always be integers between 1 and 50, and the sequence will have a maximum length of 100. The Fizz and Buzz numbers might be equal, and might be equal to 1.
Examples
- Classic FizzBuzz; multiples of 3 are replaced by Fizz, multiples of 5 are replaced by Buzz:
[1, 2, "Fizz", 4, "Buzz", 6] ==> [3, 5]
- Multiples of 2 are replaced by Fizz, multiples of 3 are replaced by Buzz:
[1, "Fizz", "Buzz", "Fizz", 5, "FizzBuzz"] ==> [2, 3]
- Multiples of 2 are replaced by Fizz and Buzz:
[1, "FizzBuzz", 3, "FizzBuzz", 5, "FizzBuzz"] ==> [2, 2]
- Fizz = 1, Buzz = 6:
["Fizz", "Fizz", "Fizz", "Fizz", "Fizz", "FizzBuzz"] ==> [1, 6]
Fundamentals
Similar Kata:
Stats:
Created | Sep 4, 2017 |
Published | Sep 5, 2017 |
Warriors Trained | 2467 |
Total Skips | 55 |
Total Code Submissions | 5531 |
Total Times Completed | 1109 |
JavaScript Completions | 571 |
Python Completions | 516 |
Ruby Completions | 63 |
Total Stars | 62 |
% of votes with a positive feedback rating | 93% of 245 |
Total "Very Satisfied" Votes | 214 |
Total "Somewhat Satisfied" Votes | 27 |
Total "Not Satisfied" Votes | 4 |
Total Rank Assessments | 10 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |