2022 SSMO Tiebreaker Round Problems/Problem 1

Problem

For all positive integers $n,$ let $S(n)$ denote the least positive integer $x$ such that $n+x$ is a palindrome. Find the value of $\displaystyle{\sum_{n=1}^{100}S(n)}.$

Solution