JuniorMath
Convert Integer to the Sum of Two No-Zero Integers
No-Zero integer is a positive integer that does not contain any 0 in its decimal representation.
Given an integer n, return a list of two integers [a, b] where:
aandbare No-Zero integers.a + b = n.
The test cases are generated so that there is at least one valid solution. If there are many valid solutions, you can return any of them.
Example 1
Input
n = 2Output
[1,1]Let a = 1 and b = 1; both are no-zero integers, and a + b = 2 = n.
Example 2
Input
n = 11Output
[2,9]Let a = 2 and b = 9; both are no-zero integers, and a + b = 11 = n.
Constraints
- 2 <= n <= 10^4