MathCastle
OlympiadSuperchallengeOlympiad Number Theory

Olympiad Number Theory · Superchallenge problem

A magician asks you to pick a number, multiply it by 99, and then repeatedly replace the number with the sum of its digits until a single digit remains. How many of the integers nn with 1≤n≤10001 \le n \le 1000 produce a final digit different from 99?