[LeetCode] Find Numbers with Even Number of Digits (Python)
2024. 2. 27. 10:17ㆍ자료구조
class Solution:
def findNumbers(self, nums: List[int]) -> int:
res = 0
for i in range(len(nums)):
if len(str(nums[i])) % 2 == 0:
res += 1
return res
'자료구조' 카테고리의 다른 글
[LeetCode] Remove Element (Python) (0) | 2024.02.27 |
---|---|
[LeetCode] Merge Sorted Array (Python) (0) | 2024.02.27 |
[LeetCode] Duplicate Zeros (Python) (0) | 2024.02.27 |
[LeetCode] Squares of a Sorted Array (Python) (0) | 2024.02.27 |
[LeetCode] Max Consecutive Ones (Python) (0) | 2024.02.27 |