please can anyone help me understand the editorial of the problem : last digit sum
link: LASTDIG - Editorial - editorial - CodeChef Discuss