QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 1024 MB Total points: 100 Hackable ✓

#18691. Простой расчет

Statistics

Определим $f(x)$ как количество целых чисел $y$, таких что $1 \leq y \leq x$ и $\gcd(x,y)=1$. Здесь $\gcd(x,y)$ — наибольший общий делитель $x$ и $y$.

Определим $g(x) = k \cdot f(x)$.

Определим $g^{(t)}(x)=g(g^{(t-1)}(x))$ при $t>1$, и $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.