It’s my first time posting here, so let me know if I’m breaking any rules. (I did not find a topic dedicated to this puzzle so I created this one but don’t hesitate to point me to the right topic if it exists)
I am working on the De-FizzBuzzer puzzle and I validate test cases 1, 2 and 4. However I think I am misunderstanding something:
In one test case I have
BuzzBuzzBuzz as input and the test case tells me that the expected value is
25, how can it be?
If I take
25 and applies the rules I get:
- produce Fizz for each time the digit 3 appears in the integer => Don’t produce anything, there is no
- produce Fizz for each time the integer can be divided by 3; =>Don’t produce anything
25%3 != 0
- produce Buzz for each time the digit 5 appears in the integer; => Produce one
Buzzas there is one
- produce Buzz for each time the integer can be divided by 5; => Produce one
25%5 == 0
- if no Fizz or Buzz has been produced so far, produce the original integer as the substring. => We already produced something so don’t do that.
Which gives me the string
BuzzBuzz for 25.
Could someone explain to me how 25 can produce
BuzzBuzzBuzz following the rules of the puzzle?
Thank you in advance!