# Find Numbers with Even Number of Digits

## Description

Given an array `nums` of integers, return how many of them contain an **even number** of digits.

**Example 1:**

> **Input:** nums = \[12,345,2,6,7896]&#x20;
>
> **Output:** 2&#x20;
>
> **Explanation:**&#x20;
>
> 12 contains 2 digits (even number of digits).&#x20;
>
> 345 contains 3 digits (odd number of digits).&#x20;
>
> 2 contains 1 digit (odd number of digits).&#x20;
>
> 6 contains 1 digit (odd number of digits).&#x20;
>
> 7896 contains 4 digits (even number of digits).&#x20;
>
> Therefore only 12 and 7896 contain an even number of digits.

**Example 2:**

> **Input:** nums = \[555,901,482,1771]&#x20;
>
> **Output:** 1&#x20;
>
> **Explanation:**&#x20;
>
> Only 1771 contains an even number of digits.



**Constraints:**&#x20;

* `1 <= nums.length <= 500`
* `1 <= nums[i] <= 10^5`

## **Code**

```java
public boolean judge(int num) {
    if (num >= 10 && num <= 99) return true;
    else return num >= 1000 && num <= 9999;
}

public int findNumbers(int[] nums) {
    int count = 0;
    for (int num : nums) {
        if (judge(num)) {
            count++;
        }
    }
    return count;
}
```
