BrainTwister #122: Squares and cubes

From New Scientist #3591, 18th April 2026 [link] [link] 16² (= 256) and 16³ (= 4096) both have the same final digit. (a) How many numbers between 0 and 9 (inclusive) are there whose square and cube have the same final digit? (b) What is the smallest three-digit number whose square and cube have the same [ ]