パナソニックプログラミングコンテスト(AtCoder Beginner Contest 195)
F
Coprime Present
AtCoder
⌀ 2068
原题
← E→
翻译中…

Problem Statement

翻译中…

You have $B-A+1$ cards: for each integer from $A$ through $B$, you have one card with that integer written on it. You will give some of them (possibly none) to your pet, Snuke.

翻译中…

Snuke will be happy if, for every pair of different cards, the numbers written on them are pairwise coprime; otherwise, he will be sad.

翻译中…

How many sets of cards will make Snuke happy?

翻译中…

Constraints

翻译中…
  • $1 \leq A \leq B \leq 10^{18}$
  • $B-A \leq 72$
  • All values in input are integers.
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format:

翻译中…

A B

翻译中…

Output

翻译中…

Print the number of sets of cards that will make Snuke happy. The constraints guarantee that the answer is less than $2^{63}$.

翻译中…

样例

Input #1
2 4
Output #1
6
You have three cards with $2$, $3$, and $4$ written on them. The following six sets of cards will make Snuke happy: - $\{\}$ - $\{2\}$ - $\{3\}$ - $\{4\}$ - $\{2,3\}$ - $\{3,4\}$
Input #2
1 1
Output #2
2
The following two sets of cards will make Snuke happy: - $\{\}$ - $\{1\}$
Input #3
123456789000 123456789050
Output #3
2125824
题目信息
题号
abc195_f
时间限制
2 s
内存限制
1024 MB

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