[Community Puzzle] Reverse FizzBuzz


Send your feedback or ask for help here!

Created by @ndc,validated by @Pi-Geometry,@Sethius and @_SG_Bisou.
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

1 Like

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