UberOA #11
Count Numbers With Odd Digit-Zeros
Estimated EasyJudge-ready
Topics (AI-labelled)StringsBits & Math
Using standard decimal representation, count the elements in which the digit 0 appears an odd number of times; the integer 0 itself is written as a single 0 and qualifies.
This site's standard input/output is stated explicitly.
Input
The first line contains n, and the second line contains n integers; 1≤n≤1000, 0≤a[i]≤10⁹.
Output
Output one integer answer.
Example 1
Input:
5
20 11 10 10070 7
Output:
3
Example 2
Input:
2
0 100
Output:
1
Example 3
Input:
2
1010 10100
Output:
1
Example notes
Example 1: 20, 10, and 10070 contain 1, 1, and 3 zeros respectively, so the answer is 3. Example 2: 0 contains one 0 and qualifies, while 100 contains two and does not, so the answer is 1. Example 3: 1010 has two 0s and does not qualify, while 10100 has three 0s and qualifies, so the answer is 1.
Editorial
Loading solution…