WayfairOA #4
Validating Magical Binary Strings with RegEx (NG)
估计简单可在线判题
考点(AI 标注)字符串
Determine whether a binary string starts with 1, contains at least two 0s, and has an even total number of 0s.
The standard input/output format and any supplementary ranges on this site are as stated in this problem.
输入格式
The first line contains q (1≤q≤1000), followed by q lines, each a binary string of length 1..1000.
输出格式
For each string, output True or False on its own line.
样例 1
输入:
1
1001
输出:
True
样例 2
输入:
1
11000
输出:
False
样例 3
输入:
1
0101
输出:
False