📜  查找偶数位数的数字 leetcode - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:24.613000             🧑  作者: Mango

代码示例1
// https://leetcode.com/problems/find-numbers-with-even-number-of-digits/
// Find Numbers with Even Number of Digits

class Solution {
    public int findNumbers(int[] nums) {
        int count=0;
        for(int i =0 ; i< nums.length; i++){
            if((nums[i]>9 && nums[i]<100) || (nums[i]>999 && nums[i]<10000) || nums[i]==100000){
                count++;
            }
        }
        return count;
    }
}