Given $N$, we have to represent $N$ = $A$ + $B$, where $A$ and $B$ are positive integers. The task is to find the minimum sum of digits of $A$ + sum of digits of $B$.
For example: $N = 15$, it can be represented $A = 1, B = 14$, where the sum of digits = $6$, which is the minimum sum of digits I can get.
I just noticed that the answer is the sum of digits of $N$ if $N$ is not a power of ten, otherwise the answer is $10$.
Why is this true?
Let our number be written as: $$N=x_1x_2x_3x_4\ldots x_n$$
(Note: this is concatenation, not multiplication)
Then $\forall i; 0\leq x_i \leq 9$
and we may easily pick two numbers $$A=a_1a_2\ldots a_n$$ and $$B=b_1b_2\ldots b_n$$ (with the same constraints) such that $$\forall i; a_i +b_i = x_i$$ The digit sum remains consistent on account of this, i.e. $$digsum(N)=digsum(A)+digsum(B)$$
For $N=10^k$, we take $A=9(10^{k-1})$, and $B = 10^{k-1}$ for an easy solution. It can't be $1$ because of the $A,B>0$ requirement, so it must be the next power of ten up.