R, 21 bytes
\(x)x*10^nchar(x)%/%9
Uses an 'x
multiplied by 111
' approach, where the '111
' is constructed as the next power-of-10 greater-or-equal to x
, integer-divided by 9.
(now reading the other answers: this is the same approach already used in xnor's Python answer)