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.
If all the machines are slow, then we'll waste a lot of time doing needless computation for this method.
For example, what if we have a goal of 10^9, only 1 machine, and it produces an item every 10^9 days? Your code will have to increment the "days" variable 10^18 times! This is far too slow
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Minimum Time Required
You are viewing a single comment's thread. Return to all comments →
If all the machines are slow, then we'll waste a lot of time doing needless computation for this method.
For example, what if we have a goal of 10^9, only 1 machine, and it produces an item every 10^9 days? Your code will have to increment the "days" variable 10^18 times! This is far too slow