Skip to content

Commit a366a88

Browse files
committed
1295
1 parent 0035ef8 commit a366a88

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

1295.cpp

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
class Solution {
2+
public:
3+
int findNumbers(vector<int>& nums) {
4+
int n=nums.size();
5+
int counter=0;
6+
for(int i=0;i<n;i++)
7+
{
8+
int a=nums[i];
9+
int count=0;
10+
while(a!=0){
11+
a=a/10;
12+
count++;
13+
}
14+
if(count%2==0){
15+
counter++;
16+
}
17+
18+
}
19+
return counter;
20+
}
21+
};

0 commit comments

Comments
 (0)