Skip to content

Commit 515ef64

Browse files
committed
Find Numbers with Even Number of Digits
1 parent 1ab40ed commit 515ef64

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
""" https://leetcode.com/problems/find-numbers-with-even-number-of-digits/ """
2+
3+
class Solution:
4+
def findNumbers(self, nums):
5+
count = 0
6+
7+
for num in nums:
8+
if (len(str(num)) % 2 == 0):
9+
count += 1
10+
11+
return count
12+
13+
print(Solution().findNumbers([555,901,482,1771]))

0 commit comments

Comments
 (0)