AIME II 2026 (Problem 4)

For each positive integer nn let f(n)f(n) be the value of the base-ten numeral nn viewed in base bb, where bb is the least integer greater than the greatest digit in nn. For example, if n=72n=72, then b=8b=8, and 7272 as a numeral in base 88 equals 78+2=587\cdot8+2=58; therefore f(72)=58f(72)=58. Find the number of positive integers nn less than 1000 such that f(n)=nf(n)=n.