#P5627. 【AFOI-19】sum与prod
【AFOI-19】sum与prod
Background
SY finally tidied up her messy quilt. As soon as she arrived in the classroom, she received a note from QM...
To: Dear SY
Take a look at the formula I dreamed of last night. Solve it and I will give you candy.
From: Your QM.
SY, of course, could not resist the temptation of . But when she saw the fancy formula on the back of the note, she was stunned... Still, SY really wanted to eat candy.
Problem Description
Find the value of
$$\sum_{i=1}^{2^{n}}\log_{2}{(\prod_{j = 1}^{i}lowbit(j))}$$where means the result of x&(~x+1).
Input Format
One line containing an integer .
Output Format
One line containing one integer, the answer modulo .
2
5
5
447
Hint
For the first of the testdata, .
For the first of the testdata, .
For the full of the testdata, .
Translated by ChatGPT 5