본문 바로가기
python-algorithm

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

by 무적김두칠 2022. 4. 14.

1
2
3
4
5
6
class Solution:
    def getNoZeroIntegers(self, n: int-> List[int]:
        for i in range(1, n):
            if not '0' in str(i) and not '0' in str(n-i) :
                answer=[i,n-i]; break
        return(answer)
cs

 

반응형

댓글