atcoder#ARC135A. [ARC135A] Floor, Ceil - Decomposition
[ARC135A] Floor, Ceil - Decomposition
Score : points
Problem Statement
There is an integer written on a blackboard. You can do the operation below any number of times (possibly zero).
- Choose an integer written on the blackboard.
- Erase one from the blackboard and write two new integers and .
Find the maximum possible product of the integers on the blackboard after your operations, modulo .
What are $\lfloor \frac{x}{2}\rfloor$ and $\lceil \frac{x}{2}\rceil$?
For a real number , denotes the largest integer not greater than , and denotes the smallest integer not less than . For example, the following holds.
- For , we have and .
- For , we have , .
Constraints
Input
Input is given from Standard Input from the following format:
Output
Print the maximum possible product of the integers on the blackboard after your operations, modulo .
15
192
Here is a sequence of operations that makes the product of the integers on the blackboard .
- The initial state of the blackboard is .
- An operation with changes it to .
- An operation with changes it to .
- An operation with changes it to .
- An operation with changes it to .
Here, the product of the integers on the blackboard is .
3
3
Doing zero operations makes the product of the integers on the blackboard .
100
824552442
The maximum possible product of the integers on the blackboard after your operations is , which should be printed modulo .