tungggg

Taum B'days Hackerrank Sol

Mar 18th, 2022
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.17 KB | None | 0 0
  1. long taumBday(int b, int w, int bc, int wc, int z) {
  2.     long  cost = (long )w * (long )( min(wc, bc +z ) ) + (long)b* (long)(min ( bc , wc+z ));
  3.     return cost ;
  4. }
Advertisement
Add Comment
Please, Sign In to add comment