F - Double Sum 2
Editorial
/


Time Limit: 4 sec / Memory Limit: 1024 MB
配点 : 点
問題文
正整数 に対して を「 が偶数である間 を で割り続けたときの、最終的な の値」として定義します。例えば 、 です。
長さ の整数列 が与えられるので、 を求めてください。
制約
- 入力は全て整数
入力
入力は以下の形式で標準入力から与えられる。
出力
答えを出力せよ。
入力例 1Copy
Copy
2 4 8
出力例 1Copy
Copy
5
、 、 です。したがって、 を出力してください。
入力例 2Copy
Copy
3 51 44 63
出力例 2Copy
Copy
384
入力例 3Copy
Copy
8 577752 258461 183221 889769 278633 577212 392309 326001
出力例 3Copy
Copy
20241214
Score : points
Problem Statement
For a positive integer , define as follows: "While is even, keep dividing it by . The final value of after these divisions is ." For example, , and .
Given an integer sequence of length , find .
Constraints
- All input values are integers.
Input
The input is given in the following format from Standard Input:
Output
Print the answer.
Sample Input 1Copy
Copy
2 4 8
Sample Output 1Copy
Copy
5
, , . Thus, Print .
Sample Input 2Copy
Copy
3 51 44 63
Sample Output 2Copy
Copy
384
Sample Input 3Copy
Copy
8 577752 258461 183221 889769 278633 577212 392309 326001
Sample Output 3Copy
Copy
20241214