Skip to content

Commit 10da286

Browse files
authored
Create 1295. Find Numbers with Even Number of Digits (#782)
2 parents 96bbadd + 4cccd85 commit 10da286

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
class Solution {
2+
public:
3+
int findNumbers(vector<int>& nums) {
4+
int ans = 0;
5+
for(auto &x : nums){
6+
ans += to_string(x).size() & 1 ? 0 : 1;
7+
}
8+
return ans;
9+
}
10+
};

0 commit comments

Comments
 (0)