Perfect Cubes in a Range
Basic Accuracy: 19.75% Submissions: 3959 Points: 1

Given two given numbers a and b where 1<=a<=b, find the perfect cubes between a and b (a and b inclusive).

Input:
First line of input contains number of test cases T. Each line of test case contain numbers 'a' and 'b' separated by a single space.

Output:
Perfect cubes between a & b  are displayed. If there are no perfect cubes between a & b then print "No".

Constraints:
1 <= T <= 50
1 <= a <= b <= 10000

Example:
Input:

2
1 100
24 576

Output:
1 8 27 64
27 64 125 216 343 512

to report an issue on this page.

Editorial

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

Yes

All Submissions

My Submissions:

Login to access your submissions.