Problem 3533 · Hard

Concatenated Divisibility

Reorder the numbers so that writing them one after another gives a number divisible by k. Return the smallest such order, compared as a list of integers, or an empty list when no order works.

Open the interactive visualisation