You are viewing a single comment's thread. Return to all comments →
` cost=0 flag=0 if bc+z<wc: flag=1 cost=cost+(bc+z)*w if wc+z<bc: flag=2 cost=cost+(wc+z)*b if flag==0: cost=(bc*b)+(wc*w) if flag==1: cost=cost+(b*bc) if flag==2: cost=cost+(w*wc) return cost
`
Seems like cookies are disabled on this browser, please enable them to open this website
An unexpected error occurred. Please try reloading the page. If problem persists, please contact support@hackerrank.com
Taum and B'day
You are viewing a single comment's thread. Return to all comments →
`