Class Solution

  • All Implemented Interfaces:

    
    public final class Solution
    
                        

    1317 - Convert Integer to the Sum of Two No-Zero Integers\.

    Easy

    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:

    • A and B are 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 = 2

    Output: 1,1

    Explanation: A = 1, B = 1. A + B = n and both A and B do not contain any 0 in their decimal representation.

    Example 2:

    Input: n = 11

    Output: 2,9

    Constraints:

    • <code>2 <= n <= 10<sup>4</sup></code>

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      Solution()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final IntArray getNoZeroIntegers(Integer n)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait