#abc306b. B - Base 2

B - Base 2

Score : 200200 points

问题描述

你将获得一个包含 0011 的序列 A=(A0,A1,,A63)A=(A_0,A_1,\dots,A_{63}),其长度为 6464

请计算:$A_0 \times 2^0 + A_1 \times 2^1 + \dots + A_{63} \times 2^{63}$。

以上为通义千问 qwen-max 翻译,仅供参考。

Problem Statement

You are given a sequence A=(A0,A1,,A63)A=(A_0,A_1,\dots,A_{63}) of length 6464 consisting of 00 and 11.

Find A020+A121++A63263A_0 2^0 + A_1 2^1 + \dots + A_{63} 2^{63}.

Constraints

  • AiA_i is 00 or 11.

Input

The input is given from Standard Input in the following format:

A0A_0 A1A_1 \dots A63A_{63}

Output

Print the answer as an integer.

Sample Input 1

1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Sample Output 1

13

$A_0 2^0 + A_1 2^1 + \dots + A_{63} 2^{63} = 2^0 + 2^2 + 2^3 = 13$.

Sample Input 2

1 0 1 0 1 0 0 0 0 1 0 0 1 1 0 1 1 1 1 0 0 0 1 0 0 1 1 1 1 1 1 0 0 0 0 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 0 0 0 1 0 1 0 1 0 1 0 0 0 0

Sample Output 2

766067858140017173

update @ 2024/3/10 08:38:11