問題一覧 > 通常問題

No.2902 ZERO!!

レベル : / AI推定難易度 : 1975 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 53
作問者 : 👑 獅子座じゃない人 / テスター : cleantted 👑 amentorimaru 👑 Nachia
お気に入りにしたユーザー ProblemId : 10083 / 自分の提出
問題文最終更新日: 2024-09-26 23:00:54
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

You are given an integer $N$ greater than or equal to $2$.

For an integer $b$ greater than or equal to $2$, the positive integer $p_b$ and the non-negative integer $e_b$ such that $N!=p_b\times b^{e_b}$ (where $p_b$ is not divisible by $b$) are uniquely determined.

Find $\sum_{b=2}^{N!} e_b$ modulo $998244353$.

Input

$N$

  • All inputs are integers.
  • $2\leq N\leq 10^6$

Output

Print $\sum_{b=2}^{N!} e_b$ modulo $998244353$, followed by a newline.

Sample

Sample 1
Input
3
Output
3

We have $3!=6$.

For $b=2$, since $6=3\times 2^1$, we get $p_2=3,\ e_2=1$. $3$ is not divisible by $2$.

For $b=3$, since $6=2\times 3^1$, we get $p_3=2,\ e_3=1$. $2$ is not divisible by $3$.

For $b=4$, since $6=6\times 4^0$, we get $p_4=6,\ e_4=0$. $6$ is not divisible by $4$.

For $b=5$, since $6=6\times 5^0$, we get $p_5=6,\ e_5=0$. $6$ is not divisible by $5$.

For $b=6$, since $6=1\times 6^1$, we get $p_6=1,\ e_6=1$. $1$ is not divisible by $6$.

Therefore, the answer is $\sum_{b=2}^{N!} e_b=\sum_{b=2}^{6} e_b=1+1+0+0+1=3$.

Sample 2
Input
7
Output
66

Sample 3
Input
1000000
Output
529018025

Print the remainder when divided by $998244353$.

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