問題一覧 > 通常問題

No.2552 Not Coprime, Not Divisor

レベル : / AI推定難易度 : 1250 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 37
作問者 : sepa38 / テスター : dyktr_06 InTheBloom Seed57_cash
お気に入りにしたユーザー ProblemId : 10363 / 自分の提出
問題文最終更新日: 2023-11-25 12:01:59
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
MMA Contest 017 (順位表) の他の問題:

Problem Statement

Find the number of pairs of positive integers $x, y$ $(x < y)$ not exceeding $N$ that satisfy $1 < \gcd(x, y) < x$.

Here, $\gcd(x, y)$ denotes the greatest common divisor of $x$ and $y$.

Input

$N$

Constraints

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

Output

Output the result in $1$ line.

Sample

Sample 1
Input
9
Output
3

The only pairs $(x, y)$ satisfying the condition are the $3$ pairs $(4, 6)$, $(6, 8)$, and $(6, 9)$.

Sample 2
Input
1
Output
0

Sample 3
Input
231125
Output
10469378012

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