""" Greg Murashige

We want make a package of goal kilos of chocolate. We
have small bars (1 kilo each) and big bars (5 kilos each).
Return the number of small bars to use, assuming we always
se big bars before small bars. Return -1 if it can't
be done.


make_chocolate(4, 1, 9) → 4
make_chocolate(4, 1, 10) → -1
make_chocolate(4, 1, 7) → 2
"""

def make_chocolate(small, big, goal):
  if big * 5 + small < goal:
    return -1
  if goal % 5 > small:
    return -1
  if big * 5 < goal:
    return goal - big * 5
  return goal - 5 * (goal / 5)

903c5b1f6b8a1d58ffb79609277684fe3333e548
<mask token>

<mask token>


def make_chocolate(small, big, goal):
    if big * 5 + small < goal:
        return -1
    if goal % 5 > small:
        return -1
    if big * 5 < goal:
        return goal - big * 5
    return goal - 5 * (goal / 5)

""" Greg Murashige

We want make a package of goal kilos of chocolate. We
have small bars (1 kilo each) and big bars (5 kilos each).
Return the number of small bars to use, assuming we always
se big bars before small bars. Return -1 if it can't
be done.


make_chocolate(4, 1, 9) → 4
make_chocolate(4, 1, 10) → -1
make_chocolate(4, 1, 7) → 2
"""

def make_chocolate(small, big, goal):
  if big * 5 + small < goal:
    return -1
  if goal % 5 > small:
    return -1
  if big * 5 < goal:
    return goal - big * 5
  return goal - 5 * (goal / 5)
