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.
- All Contests
- HourRank 27
- Maximizing the Profit
- Discussions
Maximizing the Profit
Maximizing the Profit
Sort by
recency
|
13 Discussions
|
Please Login in order to post a comment
I am using Python 3 and used combinations, but for some reason I am getting a timed out on some test cases:
Is there a upper limit on the length of the input that can be provided from the console (I'm using Ubuntu terminal)? It reads till 4095 characters from the input and then discards the rest. People who were able to finish this problem using Python3, I wonder how you managed to circumvent this.. Any leads on how may I proceed?
p = list(map(int, input().rstrip().split()))
still missing some test cases can anyone catch why ??
What if input is [-5, -4, 2]. Should the output be 40? In real world wouldn't the profit be negative?
me