Ad
  • Custom User Avatar

    Nope, mate.

    1st iteration: SystemA is 10 and SystemB is (10 * 0,95) ceiled to 10, so prices are equal, therefore moving to the next iteration.

    2nd iteration: SystemA is 20 and SystemB is (10 +(10 * 0,95)) ceiled to 10, so now the required condition is met (SysA > SysB).

    Result: you have to buy 2 tickets with SystemB for it to be lower after ceiling than SystemA.

  • Custom User Avatar

    the unit is not relevant for the calculation in this case

  • Custom User Avatar

    recursive, so probably slower

  • Custom User Avatar

    movie(0, 10, 0.95)

    Why is expected result 2 here?

    Should be 0 or 1, no?