問題一覧 > 通常問題

No.3364 Push_back Operation

レベル : / AI推定難易度 : 1450 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 53
作問者 : fken_prime_57 / テスター : cho435 jupiter_68 rurun noya2
お気に入りにしたユーザー ProblemId : 12795 / 自分の提出
問題文最終更新日: 2025-11-17 02:33:08
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 作問ハッカソンコンテスト 003 Day2 (順位表) の他の問題:

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もしくは右上の雲マークをクリックしてアカウントを作成してください。