Leetcode 1421 Solution
This article provides solution to leetcode question 1421 (find-numbers-with-even-number-of-digits)
Access this page by simply typing in "lcs 1421" in your browser address bar if you have bunnylol configured.
Leetcode Question Link
https://leetcode.com/problems/find-numbers-with-even-number-of-digits
Solution
class Solution:
def findNumbers(self, nums: List[int]) -> int:
ans = 0
for num in nums:
if len(str(num)) % 2 == 0:
ans += 1
return ans