The product of $46$ integers is $1$. Which of the following cannot be the sum of these $46$ integers? I am solving a problem about integers.
The product of $46$ integers is $1$. Which of the following cannot be the sum of these $46$ integers?
$A.38$

$B.6$

$C.0$

$D.-14$
To solve this, I think, we can use these equations below since the only way to get a product of 1 with integers which sum is 46, is that
$(-1)^{2n}$ $×$ $(1)^{46-2n} = 1$, $n≥ 0$
and
$(-1)x + (1)y = z$,
where $x$ is the number of times (-1) was used,
$y$ is the number of times of (1) was used, $z∈\{-14,0,6,38\}$
I am not sure if my ideas are correct and can be connected.
Any comments and/or suggestions will be much appreciated. Thank you!
Yes, you are correct so far. Your first equation implies that in the second equation you have $x+y=46$, and $x$ and $y$ are both even. So what does this tell you about the possible values of $z=y-x$? (You could just try each of the four alternatives and see if you can find suitable $x,y$.)
Suppose $a_1,\ldots,a_n$ are integers such that $a_1 \cdots a_n=1$. Then each $a_i \in \{+1,-1\}$. If $k$ of these $n$ integers are $-1$, then $n-k$ are $1$, and their sum is $n-2k$. Moreover, $k$ is even (since the product is $+1$), so that with $k=2\ell$ we have the sum $n-2k=n-4\ell$, with $0 \le k \le n$ and $0 \le \ell \le \left\lfloor\frac{n}{2}\right\rfloor$.
Conversely, any integer of the form $n-4\ell$ is attained by selecting $2\ell$ of the $a_i$'s equal to $-1$'s.
In particular, when $n=46$, the attainable sums are in $\{46-4k: 0 \le k \le 23\}$. Therefore, the only non attainable sum is $0$. $\blacksquare$