Ad
  • Custom User Avatar

    Empty object => {}

  • Custom User Avatar

    fun :)) +rep

  • Custom User Avatar
  • Default User Avatar

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

  • Custom User Avatar

    Hi there! If you want to solve hard katas, you should try kyus of higher than the lowest level. Hope this helps!

  • Custom User Avatar
  • Custom User Avatar

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

  • Default User Avatar

    this is a prime example of why floating-point numbers should never be used to represent monetary amounts. the problem is that the reference solution does 111.0 // 3.7 to calculate the total number of beers, which yields 29.0, not 30; floor(111.0 / 3.7) would yield 30.

  • Default User Avatar

    Sometimes my submission (using Python 3.11) is accepted, and sometimes the same submission fails. Here is one that failed:

    beeramid(111, 3.7)

    It reports it should be 3, but 4 (in my answer) = 111.
    It happens whether I round the cost at each step to 2 decimal places or not.

    rownum: 1
    cumulativecost: 3.7

    rownum: 2
    cumulativecost: 18.5

    rownum: 3
    cumulativecost: 51.8

    rownum: 4
    cumulativecost: 111.0

    So how is the expected answer 3 not 4? That sounds wrong to me.

  • Custom User Avatar

    thanks a lot!
    it would be great to have typed functions to make much easier to understand the conditions of the kata.

    I would be happy to updated them if that's possible.

  • Default User Avatar

    Although not explicitly stated, the sample tests indicate that the price isn't always an integer, so your calculation might be wrong, and also you type hint the input (see what happened when in not strict mode?).

    Closing as this is not an issue with the tests.

  • Custom User Avatar

    Am I making something wrong? or the random test for PHP is faulty?

    it says for example, that with a bonus of 703 and a price of 1,I should only be able to make 11 floors,
    when 12 full floors would require 650 cans

    or with a bonus: 739 and price: 5 (147 buyable beers) it can only make 6 floors, when 7 requires 140 cans

    or with a bonus: 720 and price: 5 (144 buyable beers) it can only make 6 floors, when 7 requires 140 cans

    or with a bonus: 876 and price: 2 (438 buyable beers) it can only make 9 floors, when 10 requires 385 cans

  • Default User Avatar

    C++ translation ready. Please review.

  • Default User Avatar
  • Default User Avatar

    This comment has been deleted.

  • Loading more items...