The purpose of this kata is to work out just how many bottles of duty free whiskey you would have to buy such that the saving over the normal high street price would effectively cover the cost of your holiday. 

You will be given the high street price (normPrice), the duty free discount (discount) and the cost of the holiday. 

For example, if a bottle cost £10 normally and the discount in duty free was 10%, you would save £1 per bottle. If your holiday cost £500, the answer you should return would be 500.

All inputs will be integers. Please return an integer. Round down.

Difficulty: introductory

Starter code:

def duty_free(price, discount, holiday_cost):
	

Solutions:
def duty_free(price, discount, holiday_cost):
    saving = price * discount / 100.0
    return int(holiday_cost / saving)

def duty_free(price, discount, holiday_cost):
  return holiday_cost * 100 // price // discount

def duty_free(price, discount, holiday_cost):
  return holiday_cost // (price * (discount / 100))

def duty_free(price, discount, holiday_cost):
    return holiday_cost * 100 // (price * discount)

def duty_free(p, d, h):
  return int(h/(p/100*d))

def duty_free(price, discount, holiday_cost):
    savings_per_bottle = price * discount/100
    
    return holiday_cost // savings_per_bottle #floor division because discrete units 



def duty_free(price, discount, holiday_cost):
  return int(holiday_cost / (price * (discount / 100)))

duty_free = lambda p, d, h: h // (p * d / 100)

def duty_free(price, disc, h_c):
    return int(h_c/(price*(disc/100)))

def duty_free(price, discount, holiday_cost):
  return 100*holiday_cost//(price*discount)

def duty_free(price, discount, holiday_cost):
    
    savings=price*(discount/100)    
    numberNeeded=holiday_cost/savings   
    
    return int(numberNeeded)


def duty_free(price, discount, holiday_cost):
  return int(holiday_cost / ((discount / 100) * price))

def duty_free(price, discount, holiday_cost):
      return int(round(holiday_cost//(price*discount*0.01)))
    


def duty_free(price, discount, holiday_cost):
  return int(holiday_cost / price / discount / 0.01)

def duty_free(price, discount, holiday_cost):
    x = price*(discount*.01)
    return int(holiday_cost/x)


def duty_free(p, d, cost):
  return cost//(p * (d/100))

def duty_free(price, discount, holiday_cost):
    result = holiday_cost//(price*discount*0.01)
    return(round(result))


def duty_free(price, discount, holiday_cost):
  return int(holiday_cost / (price * discount * 0.01))

from math import floor

def duty_free(price: int, discount: int, holiday_cost: int) -> int:
    """
    How many bottles of duty free whiskey you would have to buy such that the saving 
    over the normal high street price would effectively cover the cost of your holiday?
    """
    return floor(holiday_cost / (price * (discount / 100)))

def duty_free(price, discount, holiday_cost):
  a=price*(discount/100)
  b=holiday_cost//a
  return b

duty_free = lambda price,discount,holiday_cost : int(holiday_cost/(price*(float(discount)/100)))

duty_free=lambda p,d,h:int(h*100/p/d)

def duty_free(price, discount, holiday_cost):
    saving = price -(price - price * discount / 100)
    price = holiday_cost // saving
    return price

import math

def duty_free(price, discount, holiday_cost):
    percent = discount / 100 * price
    bottles = holiday_cost / percent
    return math.floor(bottles)

from math import *

def duty_free(price, discount, holiday_cost):
    discount_multiplyer = discount / 100
    return floor(holiday_cost / (price*discount_multiplyer))

import math
def duty_free(price, discount, holiday_cost):
    discount = discount * .01
    savings_per_bottle = price * discount
    number_of_bottles_needed = holiday_cost / savings_per_bottle
    return math.floor(number_of_bottles_needed)

def duty_free(price, discount, holiday_cost):
    discounted_price = (price*discount)/100
    return holiday_cost//discounted_price

import math

def duty_free(price, discount, holiday_cost):
    x = holiday_cost / (price - (price - (price * (discount / 100))))
    return math.floor(x)

def duty_free(price, discount, holiday_cost):
    economia = price - price*(100 - discount)*0.01 
    s = holiday_cost//economia
    return s


def duty_free(price, discount, holiday_cost):
    per_bottle = (discount / 100) * price
    saving = holiday_cost // per_bottle # Rounding down with floor division
    return saving

import unittest

PERCENT = 0.01


def duty_free(price, discount, holiday_cost):
    return holiday_cost // (price * discount * PERCENT)
    
    
class TestDutyFree(unittest.TestCase):
    def test_duty_free(self):
        self.assertEqual(duty_free(price=12, discount=50, holiday_cost=1000), 166)


def duty_free(price, discount, holiday_cost):
  duty_free_cost = price - (price - (price*discount*0.01))
  cost= holiday_cost // duty_free_cost
  return cost

def duty_free(price, discount, holiday_cost):
    total_discount = price * discount / 100
    return holiday_cost // total_discount

def duty_free(price, discount, holiday_cost):
    a = price*(discount/100)
    b = holiday_cost//a
    b = int(b)
    return b
print(duty_free(12, 50, 1000))

def duty_free(price, discount, holiday_cost):
    bottles = holiday_cost / (price * discount)
    return int(bottles * 100)

def duty_free(price, discount, holiday_cost):
    ma = (price / 100 ) * discount
    return int(holiday_cost / ma )

def duty_free(price, discount, holiday_cost):
    spare = price/100 * discount
    return  int(holiday_cost / spare)

def duty_free(price, discount, holiday_cost):
    return int(holiday_cost / ((discount / 100)*price))
 #   return price


def duty_free(price, discount, holiday_cost):
    newprc = price * (1-discount/100)
    saving = price - newprc
    return holiday_cost//saving

duty_free = lambda price, discount, holiday_cost: int(100*holiday_cost/(price*discount))

def duty_free(price, discount, holiday_cost):
    
    output =  price * discount / 100
    result=int(holiday_cost/output)
    return result
    
    


def duty_free(price, discount, holiday_cost):
    discount_total = price/100 * discount
    result = holiday_cost // discount_total
    return result


import math
def duty_free(price, discount, holiday_cost):
    i =(discount/100) * price
    return math.floor(holiday_cost/i)

import math
def duty_free(price, discount, holiday_cost):
    leftover = price*(discount/100)
    num = holiday_cost/leftover
    return math.floor(num)

def duty_free(price, discount, holiday_cost):
    discount /= 100
    price_with_discount = price*discount
    finish_price = 0
    count = 0
    while finish_price < holiday_cost:
        finish_price += price_with_discount
        if finish_price > holiday_cost:
            break
        count += 1
    return count

def duty_free(price, discount, holiday_cost):
        proc = discount / 100 
        price_new = proc * price
        final = holiday_cost / price_new
        return int(final)

def duty_free(price, discount, holiday_cost):
    amount_discount = price / 100 * discount
    result = holiday_cost // amount_discount
    return result


def duty_free(price, discount, holiday_cost):
    # holiday cost / (price*discount) 
    money = price * (discount/100)
    return int(holiday_cost/money)

def duty_free(price, discount, holiday_cost):
    q=0
    w=0
    p=0
    q=(price*discount)/100
    w=(holiday_cost/q)*10
    return (w//10)

def duty_free(price, discount, holiday_cost):
    cst = holiday_cost // ((discount / 100) * price)
    return cst

def duty_free(price, discount, holiday_cost):
    disc = price * discount / 100
    duty_free = holiday_cost // disc
    return duty_free


def duty_free(price, discount, holiday_cost):
  a = int(price) * int(discount) / 100
  return int(holiday_cost / a)

import math
def duty_free(price, discount, holiday_cost):
    percent = price / 100 * discount
    return math.floor(holiday_cost / percent)
print((duty_free(12, 50, 1000))) 
    


def duty_free(price, discount, holiday_cost):
    spb = price * discount / 100
    return holiday_cost // spb

def duty_free(price, discount, holiday_cost):
    savings = price * discount/100
    sol = holiday_cost/savings
    return int(sol)

def duty_free(p, d, c):
    r = c // (p * d / 100)
    return r

def duty_free(price, discount, holiday_cost):
    print(price,discount, holiday_cost)  
    return holiday_cost//(discount*.01*price)

def duty_free(price, discount, holiday_cost):
    
    dfree= (price*discount)/100
    return holiday_cost//dfree

def duty_free(price, discount, holiday_cost):
    d = discount / 100
    p = price * d
    return holiday_cost // p


def duty_free(price,
              discount,
              holiday_cost):


    discount_amount = discount / 100. * price
    if (discount_amount):

        return holiday_cost // discount_amount

    return holiday_cost


def duty_free(price, discount, holiday_cost):
    sale_price = price * discount / 100
    return int(holiday_cost / sale_price)

def duty_free(price, discount, holiday_cost):
    actual_price = price * discount/100
    
    count = 0
    total = 0
    while total < holiday_cost:
        total += actual_price
        count += 1
        
    return count-1

def duty_free(price, discount, holiday_cost):
    disc_price = (discount/100) * price
    return holiday_cost // disc_price 


def duty_free(price, discount, holiday_cost):
    savings = price - (discount/100)*price
    print(price,discount,holiday_cost,savings,holiday_cost//savings)
    return holiday_cost // (price-savings)

def duty_free(price, discount, holiday_cost):
    return holiday_cost//(price-(price*(1-(0.01*discount))))

def duty_free(price, discount, holiday_cost):
    x = price / 100 * discount
    return int(holiday_cost / x)


def duty_free(price, discount, holiday_cost):
    x = price * (discount/100)
    price = holiday_cost /x
    return (int(price))
    
    


def duty_free(price, discount, holiday_cost):
    price2=price* (discount/100)
    cost=holiday_cost/price2
    return ( int(cost) )

def duty_free(price, discount, holiday_cost):
    
    economy_nom = price * discount / 100
    return int(holiday_cost / economy_nom)

def duty_free(price, discount, holiday_cost):
    return int(int(holiday_cost) / int(discount) / int(price) * 100)

def duty_free(price, discount, holiday_cost):
    dut_price=price-(discount/100*price)
    saving=price-dut_price
    bottles=holiday_cost/saving
    return int(bottles)


def duty_free(price, discount, holiday_cost):
    first = (price * discount) / 100
    second = holiday_cost // first
    return second

import math
def duty_free(price, discount, holiday_cost):
    return round(int(holiday_cost/(discount*(price/100))))

def duty_free(price, discount, holiday_cost):
    savings = (price * (discount/100))
    price = holiday_cost // savings
    return price

def duty_free(price: int, discount: int, holiday_cost: int) -> int:
    return int(holiday_cost // ((discount / 100) * price))

def duty_free(price, discount, holiday_cost):
    norm_price = price * (discount / 100)
    return holiday_cost // norm_price    

def duty_free(price, discount, holiday_cost):
    price = price * discount/100
    bottles = holiday_cost // price
    return bottles

def duty_free(price, discount, holiday_cost):
    return int(holiday_cost // (price - (price * (1- (discount/100)))))

def duty_free(price, discount, holiday_cost):
    return holiday_cost // (discount / 100.0 * price)

import math

def duty_free(price, discount, holiday_cost):
    """(^-__-^)"""
    count_bottle = (price / 100)*discount
    result = holiday_cost / count_bottle
    return (math.floor(result))


duty_free = lambda price, discount, holiday_cost: holiday_cost // (price * 0.01 * discount)

def duty_free(price, discount, holiday_cost):
    save = price * discount / 100.0
    return int(holiday_cost / save)
# hard, should in the 1kyu


def duty_free(price, discount, holiday_cost):
    dsc_price = price * (1-discount)
    diff = price - dsc_price
    return int(holiday_cost / diff * 100)

def duty_free(price, discount, holiday_cost):
    saved_money = price * (discount/100)
    return int(holiday_cost / saved_money)

def duty_free(price, discount, holiday_cost):
    save = price * (discount/100)
    bottles = holiday_cost/save
    return int (bottles)


def duty_free(price, discount, holiday_cost):
    amount_saved = discount/ 100 * price
    return  int(holiday_cost/ amount_saved)

def duty_free(price, discount, holiday_cost):
  discount = discount / 100
  save = (price * discount)
  price = holiday_cost / save 
  return int(price)

import math
def duty_free(price, discount, holiday_cost):
    actual_discount = (discount / 100) * price
    no_of_bottles = holiday_cost / actual_discount
    return math.floor(no_of_bottles)

def duty_free(price, discount, holiday_cost):
    n = int(holiday_cost / (price * (discount/100))) 
    return n
    




def duty_free(normPrice, discount, holiday_cost):
    return int(holiday_cost/((normPrice*discount)/100))


def duty_free(price, discount, holiday_cost):
    savings = price * (discount /100)
    bottles = 0
    suma = savings
    while suma < holiday_cost:
        bottles += 1
        suma += savings
    return bottles


def duty_free(price, discount, holiday_cost):
    saved=(price*discount)/100
    price=holiday_cost//saved
    return price

import math 
def duty_free(price, discount, holiday_cost):
    x=(price*(discount/100))
    return math.floor(holiday_cost/x)

def duty_free(price, discount, holiday_cost):
    count = holiday_cost // (price * discount / 100) 
    return count

def duty_free(price, discount, holiday_cost):
    x=discount/100
    y=price*x
    z=holiday_cost//y
    return int(z)

def duty_free(a, b, c):
    pr = int(c/(a*b*0.01))
    return pr

def duty_free(price, discount, holiday_cost):
    price = (price * discount/100) 
    return holiday_cost // price

import math

def duty_free(price, discount, holiday_cost):
    save = price*(discount/100)
    price = holiday_cost/save
    return math.floor(price)

def duty_free(price, discount, holiday_cost):
    duty_free = price * (discount/100)
    bottles = int(holiday_cost/duty_free)
    return bottles

def duty_free(price, discount, holiday_cost):
    return holiday_cost*100/discount//price