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.
In what way is this a more intuitive solution than just printing
(n/2+n%2)* (m/2+m%2), that is realizing that at maximum a package can supply four bases and if n or m is odd we have to add one package more in either direction.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Army Game
You are viewing a single comment's thread. Return to all comments →
In what way is this a more intuitive solution than just printing (n/2+n%2)* (m/2+m%2), that is realizing that at maximum a package can supply four bases and if n or m is odd we have to add one package more in either direction.