Question 4A three-digit number has a square ending in the same three digits. Find the sum of all distinct three-digit numbers with this property.