PROGRAMMING:Calculate the average
This is a very simple question. Give you a set of data, and then please calculate the average. However, the input data has illegal data. We hope that the data is a rational number between - 1000 and + 1000, with a maximum of 2 decimal places. Illegal data cannot be calculated in the average value.
###Input format:
The number of input data in the first line is n, n does not exceed 100, and the second line gives n inputs, separated by a space.
###Output format:
For each illegal input, output "error: C is an illegal number" in one line, C is the input data, and output "the average of M numbers is p" in the last line, where m is the number of legal data and P is the average of all legal data, accurate to 2 decimal places. If there is no legal data, use 'undefined' instead of P. if there is only one legal data, output 'the average of 1 number is p'.
###Input example:
Here is a set of inputs. For example:
```in
ten
123.4 abc 9876 23.45.67 97.5 5.678 45.7 32.91 a.bc a.b.c
```
###Output example:
The corresponding output is given here. For example:
```out
ERROR: abc is an illegal number
ERROR: 9876 is an illegal number
ERROR: 23.45.67 is an illegal number
ERROR: 5.678 is an illegal number
ERROR: a.bc is an illegal number
ERROR: a.b.c is an illegal number
The average of 4 numbers is 74.88
```
answer:If there is no answer, please comment
###Input format:
The number of input data in the first line is n, n does not exceed 100, and the second line gives n inputs, separated by a space.
###Output format:
For each illegal input, output "error: C is an illegal number" in one line, C is the input data, and output "the average of M numbers is p" in the last line, where m is the number of legal data and P is the average of all legal data, accurate to 2 decimal places. If there is no legal data, use 'undefined' instead of P. if there is only one legal data, output 'the average of 1 number is p'.
###Input example:
Here is a set of inputs. For example:
```in
ten
123.4 abc 9876 23.45.67 97.5 5.678 45.7 32.91 a.bc a.b.c
```
###Output example:
The corresponding output is given here. For example:
```out
ERROR: abc is an illegal number
ERROR: 9876 is an illegal number
ERROR: 23.45.67 is an illegal number
ERROR: 5.678 is an illegal number
ERROR: a.bc is an illegal number
ERROR: a.b.c is an illegal number
The average of 4 numbers is 74.88
```
answer:If there is no answer, please comment