Problem

Source: 2022 Swedish Mathematical Competition p3

Tags: number theory, sum of digits



Let $n$ be a positive integer divisible by $39$. What is the smallest possible sum of digits that $n$ can have (in base $10$)?