We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent acabec3 commit fb9cd31Copy full SHA for fb9cd31
1001-1500/1464.py
@@ -0,0 +1,7 @@
1
+class Solution:
2
+ def maxProduct(self, nums: List[int]) -> int:
3
+ ans = 0
4
+ for i in range(len(nums)):
5
+ for j in range(i+1,len(nums)):
6
+ ans = max(ans, (nums[i]-1)*(nums[j]-1))
7
+ return ans
0 commit comments