Canadian Computing Competition: 2009 Stage 1, Senior #1
Eric likes interesting numbers like ~64~. It turns out that ~64~ is both a square and a cube, since ~64 = 8^2~ and ~64 = 4^3~. Eric calls these numbers cool. Write a program that helps Eric figure out how many integers in a given range are cool.
On the first line of input, you are given an integer ~a~ such that ~a \ge 1~ and ~a \le 10^8~. On the second line of input, you are given an integer ~b~ such that ~b \ge a~ and ~b \le 10^8~.
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).
Sample Input 1
Sample Output 1
Sample Input 2
Sample Output 2