{"problem":{"name":"184. Close Product","description":{"content":"You have $n$ positive integers, and you want to find their product. However, you have to omit exactly one of the integers from the list before calculating the product. You want to find the maximum pro","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10269184"},"statements":[{"statement_type":"Markdown","content":"You have $n$ positive integers, and you want to find their product. However, you have to omit exactly one of the integers from the list before calculating the product. You want to find the maximum product of the list, after omitting exactly one integer from the list.\n\nFor example, given the numbers $2$, $4$, and $5$, the maximum product is $5$ * $4$ = $20$. $2$ * $4$ * $5$ is not valid, because none of the numbers were omitted.\n\nThe first line of input contains a single positive integer $n$: the number of integers in the list.\n\nThe next $n$ lines each contain a single positive integer: each element of the list.\n\nOutput a single positive integer $p$: the maximum possible product of all integers in the list, if you omit exactly one. The answer is guaranteed to fit inside of a 32-bit integer type.\n\n## Input\n\nThe first line of input contains a single positive integer $n$: the number of integers in the list.The next $n$ lines each contain a single positive integer: each element of the list.\n\n## Output\n\nOutput a single positive integer $p$: the maximum possible product of all integers in the list, if you omit exactly one. The answer is guaranteed to fit inside of a 32-bit integer type.\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ n \\in \\mathbb{Z}^+ $ be the number of integers.  \nLet $ A = (a_1, a_2, \\dots, a_n) $ be a sequence of positive integers.\n\n**Constraints**  \n$ n \\geq 2 $, and $ a_i \\in \\mathbb{Z}^+ $ for all $ i \\in \\{1, \\dots, n\\} $.  \nThe result fits in a 32-bit integer.\n\n**Objective**  \nCompute:  \n$$\n\\max_{j \\in \\{1, \\dots, n\\}} \\left( \\prod_{\\substack{i=1 \\\\ i \\neq j}}^{n} a_i \\right)\n$$","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10269184","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}