Skip to content

Commit fb9cd31

Browse files
Create 1464.py
1 parent acabec3 commit fb9cd31

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

1001-1500/1464.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)