小于n的立方数自由数

小于n的立方数自由数

无立方因子的数是指那些没有立方数作为因子的数。

立方数因子是指一个整数,它是一个立方数并且能够整除该数而没有余数。

例如,8是16的立方数因子,因为8是2的立方数(2*2*2 = 8),并且8除以16的余数为零。

因此,8和16都不是无立方数。

问题陈述

找出所有小于给定数字n的无立方数。

Example

Let's understand the problem with an example. Let n = 15, Thus, we have to find all the numbers less than 15 that are cube-free. The solution will be: 2,3,4,5,6,7,9,10,11,12,13,14. For another example, Let n = 20. The numbers are 2,3,4,5,6,7,9,10,11,12,13,14,15,17,18,19. 登录后复制