### 2009 Canadian Computing Competition, Stage 1

## Problem S1: Cool Numbers

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.

### Input

On the first line of input, you are given an integer a such that a ≥ 1 and a ≤ 10^{8}. On the second line of input, you are given an integer b such that b ≥ a and b ≤ 10^{8}.

### 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).

### Sample Input 1

1 100

### Sample Output 1

2

### Sample Input 2

100 1000

### Sample Output 2

1

All Submissions

Best Solutions

**Point Value:** 5

**Time Limit:** 2.00s

**Memory Limit:** 16M

**Added:** May 09, 2009

**Languages Allowed:**

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

## Comments (Search)

Aaishaon Sep 01, 2015 - 7:32:16 am UTC ...wgma00on Sep 01, 2015 - 5:49:35 pm UTC Re: ...Aaishaon Sep 02, 2015 - 7:35:37 am UTC Re: ...bobbyg212009on Feb 27, 2011 - 7:06:13 pm UTC Could somebody tell me why I am getting the question wrong?