In this problem, we will say that a pair of integer numbers is cool if , and both and are perfect squares or perfect cubes. For instance, is a cool pair, because is a perfect cube () and is a perfect square (). As another example, is a cool pair as well (a bit special, since 0 and 1 are perfect squares and also perfect cubes).
Given an interval , how many cool pairs does it contain?
Input consists of several cases, each one with and . Assume .
For every case, print the number of cool pairs with and inside .
Author: Salvador Roura
Generation: 2026-01-25T10:21:39.406Z
© Jutge.org, 2006–2026.
https://jutge.org