Divisibility and last digits - Lycée Vicat (Souillac) Lycée Żmichowska (Varsovie)

Établissement
Lycée Vicat (Souillac)
Année
2017-2018
Résumé
You are familiar with the divisibility rule for 2: a natural number is divisible by 2 if and only if its last digit is one of: 0, 2, 4, 6 or 8. This means in particular, that the divisibility of n by k=2, depends on the last digit of n. This is not the case when speaking of divisibility by 4, but it’s easy to convince, that the divisibility of n by k=4 depends on two last digits of n.

Find all such numbers k>1, that the divisibility by k depends on the last digit of the divided number. For each l, find all such numbers k>1, that the divisibility by k depends on l last digits of the divided number.