No.3364 Push_back Operation
タグ : / 解いたユーザー数 53
作問者 :
rurun
noya2
Problem Statement
Taro initially has an empty array $A=()$. He completes an array of length $L$ by performing the following operation $L$ times.
Here, the number of operations $L$ may be any integer satisfying $1 \leq L \leq N$.
- Choose $1$ integer between $1$ and $N$, inclusive, and append the chosen value to the end of $A$.
The completed array of length $L$ must satisfy the following condition.
- Let $L$ be the length of the completed array and $A_i$ be the $i$-th number of the array. Then $\gcd(A_1,A_2,…,A_L) \equiv 0 \pmod L$ holds.
Here, we define $\gcd(x) = x$.
Find the number of distinct arrays satisfying the condition that can be created by the above operation. Since the answer can be very large, output it modulo $998244353$.
Constraints
- $N$ is an integer
- $1 \leq N \leq 10^{11}$
Input
$N$
The input is given from standard input in the above format.
Output
Output the answer modulo $998244353$.
Sample
Sample 1
Input
2
Output
3
$A = (1),(2),(2,2)$ satisfy the condition.
Sample 2
Input
100
Output
115612364
Output the answer modulo $998244353$.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。