본문 바로가기

IT/코딩테스트

[Leetcode] 1295. Find Numbers with Even Number of Digits

728x90

https://leetcode.com/problems/find-numbers-with-even-number-of-digits/submissions/

class Solution:
    def findNumbers(self, nums: List[int]) -> int:
        count = 0
        for num in nums:
            if len(str(num)) % 2 == 0:
                count += 1
        return count

 

728x90