QOJ.ac

QOJ

Limite de temps : 1 s Limite de mémoire : 512 MB Points totaux : 100

#3792. Funny Version of Fermat's Last Theorem

Statistiques

Fermat's Last Theorem states that for $n > 2$, the Diophantine equation $a^n + b^n = c^n$ has no positive integer solutions. For example, $a^3 + b^3 = c^3$ has no positive integer solutions. To liven things up, let's consider a humorous version: we change the equation to $a^3 + b^3 = c$, which then has solutions, such as $a=4, b=9, c=79$, where $4^3 + 9^3 = 793$.

Given two integers $x$ and $y$, find the number of integer solutions satisfying $x \le a, b, c \le y$.

Input

The input contains at most 10 test cases. Each test case contains two integers $x, y$ ($1 \le x, y \le 10^8$).

Output

For each test case, output the number of solutions.

Examples

Input 1

1 10
1 20
123 456789

Output 1

Case 1: 0
Case 2: 2
Case 3: 16

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.