## Problem S1: Cool Numbers

Eric likes interesting numbers like 64. It turns out that 64 is both a square and a cube, since 64 = 82 and 64 = 43. Eric calls these numbers cool. Write a program that helps Eric figure out how many integers in a given range are cool.

### Input

On the first line of input, you are given an integer a such that a ≥ 1 and a ≤ 108. On the second line of input, you are given an integer b such that b ≥ a and b ≤ 108.

### Output

The output should be the number of cool numbers in the range a to b (inclusively: that is, a and b would count as cool numbers in the range if they were actually cool).

```1
100```

`2`

```100
1000```

### Sample Output 2

`1`

Point Value: 5
Time Limit: 2.00s
Memory Limit: 16M

Languages Allowed:
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3

• (0/0)
Why are there 2 test cases that TLE when my variable types are large enough??

• (0/0)
There aren't any issues with your variables. The issue that your having is your code is too slow. This problem actually requires a little bit of insight in order to solve it within the time restrictions. Here's hint, law of exponents.

• (0/0)
Is that what you meant by law of exponents, even a little bit?

• (0/0)
same here

• (0/0)
basically, if a integer is a square of a number and a cube of a number, its a number to the power of six

• (0/3)