LeetCode --- 1317. Convert Integer to the Sum of Two No-Zero Integers 解题报告
Posted 杨鑫newlfe
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了LeetCode --- 1317. 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:
A
andB
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:
2 <= n <
以上是关于LeetCode --- 1317. Convert Integer to the Sum of Two No-Zero Integers 解题报告的主要内容,如果未能解决你的问题,请参考以下文章
LeetCode --- 1317. Convert Integer to the Sum of Two No-Zero Integers 解题报告