题目:
代码:
class Solution {
public:
bool fun(int x){
if(x==0) return false;
if(x<0) x*=-1;
int ans=1;
while(x>0){
x/=10;
ans=1-ans;
}
return ans==1;
}
int findNumbers(vector<int>& nums) {
int ans=0;
for(int i=0;i<nums.size();i++){
if(fun(nums[i])) ans++;
}
return ans;
}
};