Ad
  • Default User Avatar

    thank you so much

  • Custom User Avatar

    thank you.

    so the formula would be 4 * x + 5 * y = z
    And we are looking for the biggist z out there that does not match the equation for any x and y values of positive int, x and y do not need to be the same. It now makes sence.

    I want to try it but first, I needed to understand what is the task. (at least I am not the only one with the same problem based on the coments :D)

  • Default User Avatar

    If you have only 2 types of coins/money denominations (Google translate tells me that this is "номинал денег" I hope that's correct) - let's say you have infinitely many 2-euro coins and infinitely many 3-euro coins:

    You can make the TOTAL amounts
    2 euros: 1x 2 euro coin/
    3 euros: 1x 3 euro coin/
    4 euros: 2x 2 euro coin/
    5 euros: 1x 2 euro coin, 1x 3 euro coin
    etc.

    but you CANNOT make 1 euro total.

    For a given pair of values (here the pair is 2,3) find the maximum total you CANNOT make.

    Hope that helps!

  • Custom User Avatar

    Find the largest value that any whole number combination of the two cannot produce

    for (4,5), the answer is 11, bc every number after that (12,13,14,....) can be made by some combination of 4 and 5.

    you could try easier katas to start off or look at the solutions tab to see how other users solved it

  • Custom User Avatar

    I looked at the description and just dont get it. I tried to base the code based on test, but it works just for the test. I have been trying to make sence from atempt numbers and description here, but still do not understand what is the kata supposed to do.

    could you please explain on other examples, how did you get to the result (matematically) to understand what is code supposed to do?:
    (4,5) - why is it 11?
    (15,12) - why is it -1?
    (20,9) - why is it 151?
    (15,11) - why is it 139?