[Community Puzzle] Button Mash - Puzzle discussion

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @NicknamedTwice,validated by @Stef_3,@Harry.B,@Delicious31415 and @DeanTheMachine.
If you have any issues, feel free to ping them.

1 Like

Great puzzle.
I think it would be nice to have the test case n=0.

hi there are a case that are not in the tests for the ide but in the validators . in the validators 5 and 11 it can failed because a numerical precision.

Could you clarify why there would be a numerical precision issue here? As far as I can see, it’s possible to solve the puzzle without relying on any division, which should avoid precision problems.

Continuing the discussion from [Community Puzzle] Button Mash - Puzzle discussion

for the button mash

coding that generate a numerical precision problem in the validator 5 and 11.

the problem come with the use type double because i used the log2 and after pow.

You don’t have to use log2 or pow to solve the puzzle.

i fixed the problem in using log2 and pow and completed the puzzle 100%. i claim just that the test 5 and 11 don’t are as the validator 5 and 11 that can generate numerical precision problem.

you solved it using some formula?

No formula involved.

and you did not use division?

That’s right.