Practice Convert Integer to the Sum of Two No-Zero Integers
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
Return positive integers [a,b] whose sum is n and whose decimal representations contain no zero digit. At least one solution is guaranteed, and any valid pair is acceptable.
Source: Convert Integer to the Sum of Two No-Zero Integers on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
Input
n = 2
Output
[1,1]
# Example 2
Input
n = 11
Output
[2,9]
Constraints
2 <= n <= 10^4
Related LeetCode Problems
Practice more problems similar to Convert Integer to the Sum of Two No-Zero Integers.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.