• + 0 comments
    def taumBday(b, w, bc, wc, z):
        # Write your code here
        res= (w*wc) + (b*bc)
        should_convert = z < abs(bc-wc)
        if should_convert:
            if bc-wc > 0:
                bc = wc+z
                return (w*wc) + (b*bc)
            if wc-bc > 0:
                wc = bc+z
                return (w*wc) + (b*bc)  
        return res