最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(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的評論 (共 條)

分享到微博請遵守國家法律
武山县| 民丰县| 民县| 香格里拉县| 兴宁市| 响水县| 满洲里市| 文安县| 嘉祥县| 万山特区| 噶尔县| 岳池县| 墨竹工卡县| 肥西县| 孟村| 阳朔县| 阿鲁科尔沁旗| 安乡县| 峨眉山市| 米易县| 宜兴市| 昌邑市| 兴安盟| 青铜峡市| 福州市| 红原县| 龙海市| 集安市| 祁阳县| 靖西县| 芜湖县| 荆门市| 项城市| 泰兴市| 永胜县| 嘉祥县| 门头沟区| 辛集市| 墨江| 天祝| 泰来县|