Problem

Source: RMO Hyderabad 2016 , P4

Tags: combinatorics, Digits



Find all $6$ digit natural numbers, which consist of only the digits $1,2,$ and $3$, in which $3$ occurs exactly twice and the number is divisible by $9$.