Perfect Cube

Problem Statement:

The e-commerce company ‘Easy Shopping’ displays some specific products for its premium customers on its user interface. The company shortlisted a list of N products. The list contains the price of each product. The company will select random products for display. The selection criteria states that only those products whose price is a perfect cube number will be selected for display. The selection process is automated and is done by the company’s system. The company wishes to know the total count of the products selected for display.
Write an algorithm to find the count of products that will be displayed.

Input Format:
The first line of the input consists of an integer – numProducts, representing the number of products(N).
The second line consists of N space-separated integers – price0, price1,…,priceN-1 representing the product price of the N shortlisted products.
Output Format:
Print an integer representing the number of products that will be selected for display.
Constraints:
0<=numProducts<=10^6
0<=price<=10^6
Sample Input:
6
125 216 54 81 48 343
Sample Output:
3
Solution in C JAVA PYTHON