Middle European Mathematical Olympiad 2024 Problem T-7
Define glueing of positive integers as writing their base ten representations one after another and interpreting the result as the base ten representation of a single positive integer.
Find all positive integers for which there exists an integer with the following property: for all , we can glue the numbers in some order so that the result is a number divisible by .
Remark. The base ten representation of a positive integer never starts with zero.
Example. Glueing 15, 14, 7 in this order makes 15147.