AtCoder Beginner Contest 206(Sponsored by Panasonic)
E
Divide Both
AtCoder
⌀ 1745
原题
← DF →
翻译中…

Problem Statement

翻译中…

Given integers $L$ and $L,R\ (L \le R)$, find the number of pairs $(x,y)$ of integers satisfying all of the conditions below:

翻译中…
  • $L \le x,y \le R$
  • Let $g$ be the greatest common divisor of $x$ and $y$. Then, the following holds.
  • $g \neq 1$, $\frac{x}{g} \neq 1$, and $\frac{y}{g} \neq 1$.
翻译中…

Constraints

翻译中…
  • All values in input are integers.
  • $1 \le L \le R \le 10^6$
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format:

翻译中…

L R

翻译中…

Output

翻译中…

Print the answer as an integer.

翻译中…

样例

Input #1
3 7
Output #1
2
Let us take some number of pairs of integers, for example. - $(x,y)=(4,6)$ satisfies the conditions. - $(x,y)=(7,5)$ has $g=1$ and thus violates the condition. - $(x,y)=(6,3)$ has $\frac{y}{g}=1$ and thus violates the condition. There are two pairs satisfying the conditions: $(x,y)=(4,6),(6,4)$.
Input #2
4 10
Output #2
12
Input #3
1 1000000
Output #3
392047955148
题目信息
题号
abc206_e
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。