Ad
  • Default User Avatar

    Finally! I'm surprised by how few people used logarithms. However, I'm a little confused as to how this would work where the logarithm returns a whole number. Wouldn't that lead the program to over-estimating?

    For instance, if h = 2, window = 1, and bounce = 0.5, wouldn't log(window / h) / log(bounce) return 1, which would then be multiplied by 2 and added to 1, resulting in 3? If I recall, the answer desired by the prompt here is 1, so I'm really curious what I'm missing here, since I was on a similar path as you, but added logic to avoid this scenario.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution