AtCoder Regular Contest 135
A
Floor, Ceil - Decomposition
AtCoder
⌀ 634
原题
←B →
翻译中…

Problem Statement

翻译中…

There is an integer $X$ written on a blackboard. You can do the operation below any number of times (possibly zero).

翻译中…
  • Choose an integer $x$ written on the blackboard.
  • Erase one $x$ from the blackboard and write two new integers $\lfloor \frac{x}{2}\rfloor$ and $\lceil \frac{x}{2}\rceil$.
翻译中…

Find the maximum possible product of the integers on the blackboard after your operations, modulo $998244353$.

翻译中…

What are $\lfloor \frac{x}{2}\rfloor$ and $\lceil \frac{x}{2}\rceil$? For a real number $x$, $\lfloor x\rfloor$ denotes the largest integer not greater than $x$, and $\lceil x\rceil$ denotes the smallest integer not less than $x$. For example, the following holds. For $x = 2$, we have $\lfloor \frac{x}{2}\rfloor = 1$ and $\lceil \frac{x}{2}\rceil = 1$. For $x = 3$, we have $\lfloor \frac{x}{2}\rfloor = 1$, $\lceil \frac{x}{2}\rceil = 2$.

翻译中…

Constraints

翻译中…
  • $1\leq X \leq 10^{18}$
翻译中…

Input

翻译中…

Input is given from Standard Input from the following format:

翻译中…

X

翻译中…

Output

翻译中…

Print the maximum possible product of the integers on the blackboard after your operations, modulo $998244353$.

翻译中…

样例

Input #1
15
Output #1
192
Here is a sequence of operations that makes the product of the integers on the blackboard $192$. - The initial state of the blackboard is $(15)$. - An operation with $x = 15$ changes it to $(7, 8)$. - An operation with $x = 7$ changes it to $(8, 3, 4)$. - An operation with $x = 4$ changes it to $(8, 3, 2, 2)$. - An operation with $x = 8$ changes it to $(3, 2, 2, 4, 4)$. Here, the product of the integers on the blackboard is $3\times 2\times 2\times 4\times 4 = 192$.
Input #2
3
Output #2
3
Doing zero operations makes the product of the integers on the blackboard $3$.
Input #3
100
Output #3
824552442
The maximum possible product of the integers on the blackboard after your operations is $5856458868470016$, which should be printed modulo $998244353$.
题目信息
题号
arc135_a
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。