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
'IT > 코딩테스트' 카테고리의 다른 글
[Leetcode] 1346. Check If N and Its Double Exist (0) | 2023.08.21 |
---|---|
[Leetcode] 977. Squares of a Sorted Array (0) | 2023.08.19 |
[Leetcode] 485. Max Consecutive Ones (0) | 2023.08.19 |
[Leetcode] 1523. Count Odd Numbers in an Interval Range (0) | 2023.08.18 |
[Leetcode] 2278. Percentage of Letter in String (0) | 2023.08.16 |