• + 1 comment

    This is my code in C#

        public static long taumBday(int b, int w, int bc, int wc, int z)
        {
            long normalCost = (long)b * bc + (long)w * wc;
            long alternativeCost1 = (long)b * bc + (long)w * (bc + z);
            long alternativeCost2 = (long)w * wc + (long)b * (wc + z);
            return Math.Min(normalCost, Math.Min(alternativeCost1, alternativeCost2));
        }