Per a cada natural
,
denotem amb
la suma dels seus dígits. Donat un natural
,
trobeu el mínim
tal que
.
Entrada
L’entrada consisteix en diversos naturals
entre 1 i
.
Sortida
Per a cada
,
escriviu el mínim
que compleixi la propietat demanada, o 0 si no n’hi ha cap.
About statements
The official statement of a problem is always the one
in the PDF document. The HTML version of the statement
is also given to help you, but may contain some content
that is not well displayed. In case of doubt, always use the PDF.