In a country, there are only 2 currency denominations x and y. z is the bill amount.
Write a function to minimize the amount a person has to pay as tip with the bill. As there is no denomination less than x and y, any amount paid above z is considered tip
Input: x, y, z Output: k or "Error..." (where k is the tip amount)
Example 1