Python 3 beats 100%
\nclass Solution:\n    def maxProduct(self, nums: List[int]) -> int:\n        max_val = nums[0]\n        second_max = 0\n        \n        for i in range(1,len(
```\nclass Solution:\n    def maxProduct(self, nums: List[int]) -> int:\n        max_val = nums[0]\n        second_max = 0\n        \n        for i in range(1,len(nums)):\n            if nums[i]>=max_val:\n                second_max = max_val\n                max_val = nums[i]\n            elif nums[i]>second_max:\n                second_max = nums[i]\n        \n        return (max_val-1)*(second_max-1)\n```
['Python3']