I wish I had a brilliant mathematical answer, but it's been far too long since I have taken any math! I just did this via the brute, clumsy way of adding numbers. When I reached a total of 990, I knew the only way to reach exactly 1000 was with a 10.