Problem

Source: Bundeswettbewerb Mathematik 2019, Round 1 - Problem 2

Tags: Digits, divisible, Divisibility, number theory



The lettes $A,C,F,H,L$ and $S$ represent six not necessarily distinct decimal digits so that $S \ne 0$ and $F \ne 0$. We form the two six-digit numbers $SCHLAF$ and $FLACHS$. Show that the difference of these two numbers is divisible by $271$ if and only if $C=L$ and $H=A$. Remark: The words "Schlaf" and "Flachs" are German for "sleep" and "flax".