Problem

Source: CentroAmerican & Caribbean MO 1999 Q2

Tags: modular arithmetic, number theory proposed, number theory



Find a positive integer $n$ with 1000 digits, all distinct from zero, with the following property: it's possible to group the digits of $n$ into 500 pairs in such a way that if the two digits of each pair are multiplied and then add the 500 products, it results a number $m$ that is a divisor of $n$.