#luogsj0112. 【深基7.习6】集合求和

【深基7.习6】集合求和

Title Description

Given a set ss (number of set elements 30\le 30 ), calculate the sum of all subset elements in this set.

Input format

The elements in the collection (element 1000\le 1000 )

Output format

The sum of all subset elements.

2 3
10

Reminder

[Example Explanation]

The subsets are: ,{2},{3},{2,3}\varnothing, \{ 2 \}, \{ 3 \}, \{ 2, 3 \}, and 2+3+2+3=102+3+2+3=10 .


[Data Range]

For data of 100%100 \% , 1s301 \le \lvert s \rvert \le 30 , 1si10001 \le s_i \le 1000 , ss the sum of all subset elements 1018\le {10} ^ {18} .