[Community Puzzle] Reverse FizzBuzz


Send your feedback or ask for help here!

Created by @ndc,validated by @Pi-Geometry,@Sethius and @_SG_Sebastien.
If you have any issues, feel free to ping them.

Nice problem but it is never stated that the list doesn’t always go from 1 to n.
It’s something you discover when your testcase 3 fails and you check it.

So it should be more explicit.

Also, testcase 2 is weird cause if there are no numbers, we cannot know where the list starts.
So I made the list start at 1 if there are no numbers in the list, but I had to “invent” this rule.


It says so in the Input section: “Note that this line won’t necessary start from 1.”
I also didn’t notice this at first read… But this extra makes the puzzle much more interesting.

Initially it always did but that made the puzzle trivial imo, it’s better that way.

Didn’t see that, my bad, but the use of name n is confusing, the part with “integers in range from 1 to n” should be changed: “n consecutive integers”.

Nice puzzle, I solved it but have problems with the “Fizz is Buzz Validator”.
It seems I have something hard coded but all until parsing of “fizz” “buzz” and “fizzbuzz” is dynamic.
Any sugestions?

If you get a message saying that validators differ from testcases to avoid hardcoded solutions, it’s normal, it displays that even if you don’t hardcode.
Your problem is probably somewhere else, as stated above, the list doesn’t necessarily starts at 1, so maybe try to investigate that.

1 Like

There are too many borderline cases here.
Example would be the second test already, if there was only one buzz and otherwise only fizz, it would be impossible to find the right numbers.
The description is not informative enough for certain cases.
For easy it should at least be said that if there is only a buzz or fizz, there is also a number in the list.

Another example would be the last test.
If it were possible to take a 17 step, Buzz could also be 17.

Hi all,
despite having a 100% on tests, still got an 80% at the end, with the “Everything is a Fizz Validator” that fails. Any advice ? Thanks

Check this:


Your code should output:
4 1


wonderful, didn’t get the buzz could be lower than fizz…
Thanks !

I agree with some other people. Even though the instructions later say the sequence doesn’t necessarily begin at 1, that contradicts the top instructions for how the sequence is generated, which says that it goes from 1 to n. The instructions for how the sequence is generated should be changed so that the starting number and either the ending number or length of sequence are both specified, and that the expected results cover that range.

Hey there, also have some kind of problem.
I figured out this issue so far, that i get all test cases checked. But the result is on my site only 80% because “Fizz is Buzz Validator” fails. Because i can not see what my program put out and what the answer should be, i can not see what my failure is.

Does someone has advice to me, how to solve this anyways.

I will not include my code (yet) because as far as i understood, it is not okay to post full code.
If you need more information about how i “solved” so far, feel free to ask.

Thanks mates for helping a beginer coder out :slight_smile:

That validator is quite similar to the corresponding test, in that the input covers a similar number range, and the output numbers are the same (i.e. f = b). You may try creating custom cases to test your code.

Sadly, this doesn’t helped me. I also wrote a program, that made me all variation from Fizz(1to60) and Buzz(1to60). And my code solves all of them.
May I can post my code here, so you can give me a closer hint and then we remove the code again from this posting?

Would be highly appreciated.

Please PM me.

Thank you, i just had a smaller number (that would work if you just look at the FizzBuzz lines and ignores, that i would need double as much as i had.

Thank you