QOJ.ac

QOJ

حد الوقت: 1 s حد الذاكرة: 1024 MB مجموع النقاط: 100 قابلة للهجوم ✓

#18691. 簡單計算

الإحصائيات

定義 $f(x)$ 為滿足 $1 \leq y\leq x$ 且 $\gcd(x,y)=1$ 的整數 $y$ 的個數。這裡 $\gcd(x,y)$ 表示 $x$ 與 $y$ 的最大公因數。

定義 $g(x) = k \cdot f(x)$。

定義當 $t>1$ 時 $g^{(t)}(x)=g(g^{(t-1)}(x))$,且 $g^{(1)}(x)=g(x)$。

請求出 $g^{(t)}(n) \bmod 998\,244\,353$。

輸入格式

僅有一行包含三個整數 $n,k,t$($1 \leq n,k,t \leq 998\,244\,352$)。

輸出格式

輸出一個整數,表示答案模 $998\,244\,353$ 的結果。

範例

輸入 1

5 3 4

輸出 1

12

輸入 2

114514 1919 810

輸出 2

565299374

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.