How many integers from 1 to 1000 are perfect squares or perfect cubes (or both)?
Type in the answer (TITA): no options.
Show answer & solution
Correct answer: 38
Solution: Squares: 1², …, 31² (32² = 1024 is too big), so 31. Cubes: 1³, …, 10³, so 10. Both means sixth powers: 1, 64 and 729, so 3. Total = 31 + 10 − 3 = 38.