Problem #PRU-5294

Problems Number Theory Arithmetic Methods Invariants and semi-invariants Invariants

Problem

The distance between two villages equals 999 kilometres. When you go from one village to the other, every kilometre you see a sign on the road, saying 0999,1998,2997,...,9990. The signs show the distances to the two villages. Find the number of signs that contain only two different digits. For example, the sign 0999 contains only two digits, namely 0 and 9, whereas the sign 1998 contains three digits, namely 1, 8 and 9.