問題一覧 > 通常問題

No.1760 Setwise Coprime

レベル : / AI推定難易度 : 2400 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (解説公開後に AC するまで非表示) / 解いたユーザー数 23
作問者 : PCTprobability / テスター : NyaanNyaan tokusakurai
お気に入りにしたユーザー ProblemId : 7107 / 自分の提出
問題文最終更新日: 2021-12-29 18:51:33
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 324 (順位表) の他の問題:

Problem Statement

Find the number, modulo $998244353$, of pairs of sets $A,B$ consisting of positive integers between $1$ and $N$, inclusive, that satisfy all of the following conditions.

  • Neither $A$ nor $B$ is empty.
  • $A$ and $B$ have no common elements.
  • The greatest common divisor of all elements of $A$ and the greatest common divisor of all elements of $B$ are both $1$.

Constraints

  • All input values are integers.
  • $2 \le N \le 2 \times 10^5$

Input

$N$

Output

Output the answer in $1$ line.

Sample

Sample 1
Input
4
Output
10

For example, $A=\{1,4\},B=\{2,3\}$ satisfies the conditions.

$A=\{\},B=\{2,3,4\}$ does not satisfy the conditions because $A$ is empty.

$A=\{2,3\},B=\{3,4\}$ does not satisfy the conditions because $3$ is a common element of $A$ and $B$.

$A=\{2,4\},B=\{1\}$ does not satisfy the conditions because the greatest common divisor of all elements of $A$ is $2$.

Sample 2
Input
10
Output
37834

Sample 3
Input
2021
Output
199287659

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