본문 바로가기
python-algorithm

Leetcode 136. Single Number

by 무적김두칠 2021. 9. 24.

1
2
3
4
pythonclass Solution:
    def singleNumber(self, nums: List[int]) -> int:
        for i in nums:
            if nums.count(i)==1return i
cs
반응형

댓글