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.
- Prepare
- Python
- Itertools
- Maximize It!
- Discussions
Maximize It!
Maximize It!
Sort by
recency
|
1107 Discussions
|
Please Login in order to post a comment
After several try, I finally pass this Hard problem with the following code. It's maybe possible to improve it in term of time complexity. The logic is to take all product possibilities using the itertool.product() method, then, with a temp value, see if the current result is better than the output.
Solution