問題一覧 > 通常問題

No.2903 A Round-the-World Trip with the Tent

レベル : / AI推定難易度 : 1950 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 26
作問者 : 👑 獅子座じゃない人 / テスター : cleantted 👑 amentorimaru 👑 Nachia
お気に入りにしたユーザー ProblemId : 10082 / 自分の提出
問題文最終更新日: 2024-09-28 14:18:56
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 448 (順位表) の他の問題:

Problem Statement

Consider the map $f_K(x)=\begin{cases}2^Kx^K&(0\leq x\leq 1/2)\\2^K(1-x)^K&(1/2\lt x\leq 1)\end{cases}\ (K\geq 1)$, whose domain and codomain are both $[0,1]$.

For a positive integer $N$, define $f_K^N(x)$ recursively by $f_K^1(x)=f_K(x),\ f_K^{n+1}(x)=(f_K\circ f_K^n)(x)\ (n\geq 1)$.

Given positive integers $K$ and $N$, find the number, modulo $998244353$, of real numbers $x$ satisfying all of the following conditions.

  • $x\in [0,1]$
  • $f_K^N(x)=x$
  • For every positive integer $n$ less than $N$, $f_K^n(x)\neq x$

Input

$K\ N$

  • All inputs are integers
  • $1\leq K\leq 10^{18}$
  • $1\leq N\leq 10^6$

Output

Print the number, modulo $998244353$, of real numbers $x$ satisfying all the conditions, followed by a newline.

Sample

Sample 1
Input
2 1
Output
3

There are $3$ real numbers $x$ satisfying all the conditions: $0,\ \dfrac{1}{4},\ \dfrac{9-\sqrt{17}}{8}(=0.6096\ldots)$.

Sample 2
Input
1 6
Output
54

Sample 3
Input
1000000000000000000 1000000
Output
970415685

Print the answer modulo $998244353$.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。