nums
를 순회한다.function maxProduct(nums: number[]): number {
let first = 0
let second = 0
for(const num of nums) {
if(num <= second) continue
if(num >= first) {
second = first
first = num
} else if(num > second) {
second = num
}
}
return (first - 1) * (second - 1)
};