A positive integer X is said to be a cube-loving number if it can be written as $(a^3) \cdot b$, for some positive integers $a$ and $b$ ($a>1$,$b \ge 1$). Given a positive integer $n$, determine the number of Cube-loving numbers less than or equal to $n$.
2026-05-05 14:45:12.1777992312
On
Number of $X$ expressible in the form $a^3 \cdot b$
164 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
There are 2 best solutions below
0
On
This is the live problem of the hackerrank University Code spring https://www.hackerrank.com/contests/university-codesprint-5/challenges/cube-loving-numbers. You do not suppose to ask here. Please make your effort in the contest.
Hint: the Cube-loving numbers are exactly those numbers divisible by $p^3$ where $p$ is a prime.