五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

Base2

2023-06-19 09:13 作者:您是打尖兒還是住店呢  | 我要投稿

Problem Statement

You are given a sequence?

A=(A 0 ,A 1 ,…,A 63 ) of length 64 consisting of 0 and 1.Find A 0 2 0 +A 1 2 1 +?+A 63 2 63

?Constraints

A i? is 0 or 1.

Input

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

A 0A 1… 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 +?+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

用int或者long或者double都會存在溢出的情況,所以用java的bigInteger處理,當然也可以位運算,只是我不會了。。。


Base2的評論 (共 條)

分享到微博請遵守國家法律
芮城县| 临安市| 大悟县| 肥城市| 嘉黎县| 康定县| 宜宾市| 永登县| 桃源县| 周宁县| 龙井市| 法库县| 赣榆县| 宿州市| 资源县| 惠水县| 永清县| 上蔡县| 波密县| 科尔| 冀州市| 遂平县| 富源县| 高陵县| 怀远县| 扎囊县| 蒙阴县| 南阳市| 嘉善县| 静宁县| 黄龙县| 花垣县| 游戏| 临城县| 潮安县| 枣庄市| 大余县| 临城县| 贺兰县| 和平县| 沾益县|