Perfect Cube
Practice
3.7 (13 votes)
Basic programming
C++
Problem
15% Success 4639 Attempts 20 Points 2s Time Limit 256MB Memory 1024 KB Max Code
Given an array \(A\) of \(N\) integers.
Find the count of subarrays whose product of elements is a perfect cube.
Input Format:
- First line contains an integer \(N\).
- Next line contains \(N\) space-separated integers denoting the array elements.
Output Format:
Print the number of subarrays whose product of elements is a perfect cube.
Constraints:
\(1 \le N \le 10^5 \\ 1 \le A[i] \le 10^2\)
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:20
58 votes
Tags:
ApprovedEasyImplementationOpen
Points:20
15 votes
Tags:
AlgorithmsEasyHash MapsSorting
Points:20
48 votes
Tags:
ApprovedBasic ProgrammingEasyImplementationOpen
Editorial
Login to unlock the editorial