We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
publicstaticlongtaumBday(intb,intw,intbc,intwc,intz){// Write your code herelongminmCost=0;// long whiteBallCost = 0;// long blackBallCost = 0;longregularCost=(long)b*bc+(long)w*wc;longconvertCostBlackToWhite=(long)b*Math.min(bc,wc+z)+(long)w*Math.min(wc,bc+z);minmCost=Math.min(regularCost,convertCostBlackToWhite);returnminmCost;}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Taum and B'day
You are viewing a single comment's thread. Return to all comments →