You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
int n;
|
|
const int N = 110;
|
|
typedef long long LL;
|
|
LL a[N];
|
|
LL res;
|
|
|
|
int main() {
|
|
while (cin >> a[++n]);
|
|
n--;
|
|
for (int i = 1; i <= n; i++)res += a[i] * pow(2, n - 1);
|
|
printf("%d", res);
|
|
return 0;
|
|
} |