103061: [Atcoder]ABC306 B - Base 2

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:6 Solved:0

Description

Score : $200$ points

Problem Statement

You are given a sequence $A=(A_0,A_1,\dots,A_{63})$ of length $64$ consisting of $0$ and $1$.

Find $A_0 2^0 + A_1 2^1 + \dots + A_{63} 2^{63}$.

Constraints

  • $A_i$ is $0$ or $1$.

Input

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

$A_0$ $A_1$ $\dots$ $A_{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

Input

题意翻译

### 题目描述 给定一个由 $0$ 和 $1$ 组成的长度为 $64$ 的数列 $A=(A_0,A_1,\dots,A_{63})$,请计算 $A_0\ 2^0\ +\ A_1\ 2^1\ +\ \dots\ +\ A_{63}\ 2^{63}$ 的值。

Output

得分:200分

问题描述

给你一个由0和1组成的长度为64的序列$A=(A_0,A_1,\dots,A_{63})$。

找到$A_0 2^0 + A_1 2^1 + \dots + A_{63} 2^{63}$。

约束条件

  • $A_i$是0或1。

输入

输入以以下格式从标准输入给出:

$A_0$ $A_1$ $\dots$ $A_{63}$

输出

以整数形式输出答案。


样例输入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

样例输出1

13

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


样例输入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

样例输出2

766067858140017173

HINT

二进制转成十进制?

加入题单

算法标签: