12. For $S_{n}=\{1,2, \cdots, n\}$, for each non-empty subset $A$, we multiply each element $k(1 \leqslant k \leqslant n)$ by $(-1)^{k}$, and then sum them up. The total sum of all these sums is $\qquad$.
12. $(-1)^{n}\left[n+\frac{1-(-1)^{n}}{2}\right] \cdot 2^{n-2}$.

The problem can be transformed into finding the total sum of the elements of all subsets of the set $\left\{-1,2,-3,4, \cdots,(-1)^{n} n\right\}$. Since in this total sum each element appears $2^{n-1}$ times, we get
$$
\begin{aligned}
N & =\left[-1+2-3+4-\cdots+(-1)^{n} n\right] \cdot 2^{n-1}=[(-1+2)+(-3+4)+\cdots] \cdot 2^{n-1} \\
& =\left\{\begin{array}{ll}
\frac{n}{2} \cdot 2^{n-1}, & (n \text { is even }) \\
\frac{-n-1}{2} \cdot 2^{n-1} . & (n \text { is odd })
\end{array}\right.
\end{aligned}
$$

Combining, we get $N=(-1)^{n}\left[n+\frac{1-(-1)^{n}}{2}\right] \cdot 2^{n-2}$.