問題一覧 > 通常問題

No.3572 Number of special equations

レベル : / AI推定難易度 : 2350 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 1024 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 14
作問者 : wasab1 / テスター : butsurizuki
お気に入りにしたユーザー ProblemId : 13447 / 自分の提出
問題文最終更新日: 2026-06-20 18:27: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 502 (順位表) の他の問題:

Problem Statement

This problem is a generalization of this problem.

You are given a positive integer $N$. A polynomial $f$ of degree $N$ with real coefficients and leading coefficient $1$ satisfies the following condition.

  • If $\alpha,\beta$ are roots of $f$, then $\alpha\beta$ is also a root of $f$.
Find the number of possible polynomials $f$, modulo the prime $998244353$.

Input

$N$
  • $1\leq N\leq 10^{18}$

Output

Output the answer modulo the prime $998244353$. Print a newline at the end.

Sample

Sample 1
Input
3
Output
8
Sample 2
Input
6
Output
38

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