luogu#P5218. 无聊的水题 II
无聊的水题 II
Background
The problem setter is not skilled, and can only make this kind of problem.
Problem Description
DLS is a boy who likes playing games.
Today, he saw weapons from his friend, where the power value of the -th weapon is .
He observed these weapons for a long time and plans to buy some of them, but he wants to use the power values of the weapons he buys to form any power value. The power values of each weapon can be added together, and can even be subtracted.
For example, with a weapon whose power value is , the power values that can be formed are .
He wants to find all purchase plans that satisfy the above condition, but there are too many plans. Can you help him compute it?
Output the answer modulo .
Input Format
One line with one integer .
Output Format
One line with one integer, representing the answer.
5
26
16
65243
Hint
| Percentage of testdata | Constraints |
|---|---|
Translated by ChatGPT 5