PROGRAMMING:ID card number to determine gender and date of birth
In early China, the ID card consisted of 15 digits. The State Council decided that the number of citizen ID number increased from 15 to 18 in October 1, 1999.
The 15 ID number is composed of 15 digits, and the order is from left to right: six digit address code, six digit date of birth code (year month date is two bits), three digit digit sequence code. For the three digit sequence code, men use odd numbers such as 1, 3, 5, 7 and 9, while women use even numbers such as 2, 4, 6, 8 and 0.
The 18 ID number numbers are from left to right: six digit address code, eight digit birth date code, three digit sequence code (males use 1, 3, 5, 7, 9 odd numbers, etc. female uses 2, 4, 4, 4, even, and even a digit check code).
ID number can be judged by regular expression, or can be judged by string judgment.
Enter a string of 15 or 18 bits from the keyboard.
First, judge whether the date string in the string is consistent with the date string, if not, give a prompt.
For example, input: 3501021990229403x, output: error, the date is illegal
If the date is legal, it is considered that the character conforms to the Chinese ID code
If the input character is a 15 digit Chinese ID code, the gender and date of birth in a form similar to "October 1, 1990" will be output.
For example: input 350102901001402, then output: female, October 1, 1990
If the input character is 18 Chinese ID code, the gender and date of birth in a form similar to "October 1, 2000" will be output.
For example: input 35010220001001403x, then output: male, October 1, 2000
{special notes: the checking point is string application. If the number of samples is only in accordance with the above rules, whether the area code and the verification code are meaningful or not, the ID card verification interface API (Ministry of public security real-time interface) verification}
###Input format:
The keyboard reads in a string
###Output format:
Output the corresponding results
###Input sample 1:
Here is a set of inputs. For example:
```in
35010219990229401X
```
###Output sample 1:
The corresponding output is given here. For example:
```out
Error, illegal date
```
###Input sample 2:
Here is a set of inputs. For example:
```in
three hundred and fifty trillion and one hundred and two billion nine hundred and one million one thousand four hundred and twelve
```
###Output sample 2:
The corresponding output is given here. For example:
```out
Female, October 1, 1990
```
###Input sample 3:
Here is a set of inputs. For example:
```in
35010220001001403X
```
###Output sample 3:
The corresponding output is given here. For example:
```out
Male, October 1, 2000
```
answer:If there is no answer, please comment
The 15 ID number is composed of 15 digits, and the order is from left to right: six digit address code, six digit date of birth code (year month date is two bits), three digit digit sequence code. For the three digit sequence code, men use odd numbers such as 1, 3, 5, 7 and 9, while women use even numbers such as 2, 4, 6, 8 and 0.
The 18 ID number numbers are from left to right: six digit address code, eight digit birth date code, three digit sequence code (males use 1, 3, 5, 7, 9 odd numbers, etc. female uses 2, 4, 4, 4, even, and even a digit check code).
ID number can be judged by regular expression, or can be judged by string judgment.
Enter a string of 15 or 18 bits from the keyboard.
First, judge whether the date string in the string is consistent with the date string, if not, give a prompt.
For example, input: 3501021990229403x, output: error, the date is illegal
If the date is legal, it is considered that the character conforms to the Chinese ID code
If the input character is a 15 digit Chinese ID code, the gender and date of birth in a form similar to "October 1, 1990" will be output.
For example: input 350102901001402, then output: female, October 1, 1990
If the input character is 18 Chinese ID code, the gender and date of birth in a form similar to "October 1, 2000" will be output.
For example: input 35010220001001403x, then output: male, October 1, 2000
{special notes: the checking point is string application. If the number of samples is only in accordance with the above rules, whether the area code and the verification code are meaningful or not, the ID card verification interface API (Ministry of public security real-time interface) verification}
###Input format:
The keyboard reads in a string
###Output format:
Output the corresponding results
###Input sample 1:
Here is a set of inputs. For example:
```in
35010219990229401X
```
###Output sample 1:
The corresponding output is given here. For example:
```out
Error, illegal date
```
###Input sample 2:
Here is a set of inputs. For example:
```in
three hundred and fifty trillion and one hundred and two billion nine hundred and one million one thousand four hundred and twelve
```
###Output sample 2:
The corresponding output is given here. For example:
```out
Female, October 1, 1990
```
###Input sample 3:
Here is a set of inputs. For example:
```in
35010220001001403X
```
###Output sample 3:
The corresponding output is given here. For example:
```out
Male, October 1, 2000
```
answer:If there is no answer, please comment