Convert Integer to the Sum of Two No-Zero Integers LeetCode solution in Python

1
class Solution:
2
def getNoZeroIntegers(self, n: int) -> List[int]:
3
for i in range(1, n // 2 + 1):
4
first = str(i)
5
second = str(n - i)
6
if "0" not in first and "0" not in second:
7
return [i, n - i]

0

WPM •0 •0

100%

ACC •0 •0

0s

TIME •0