神秘钥匙 看到题就得以下公式: ans = 1*C(n,1) + 2*C(n,2) + 3*C(n,3) + ... + n*C(n,n) = n*2^(n-1) 计算过程: S1 = 0*C(n,0) + 1*C(n,1) + 2*C(n,2) + ... + n*C(n,n) S2 = n*C(n,0) + (n-1)*C(n,1) + (n-2)*C(n,2) + ... + 0*C(n,n) S = S1 + S2 = n*[C(n,0)+C(n,1)+...+C(n,n)] = n*2^n ∵ S1 = S2 (利用 C(n,m) = C(n,n-...