-->
当前位置:首页 > 题库

PROGRAMMING:Actual combat of ASCII code

Luz5年前 (2021-05-10)题库603
Given a series of characters, including uppercase and lowercase English letters and some other characters (only involving ASCII printed characters, namely ASCII value > = 32), now I want you to identify the following characters. If it is an English letter, then output its ASCII value, otherwise output "illegal" (without quotation marks).
###Input format:
The first line is an integer n (0 < = n < = 1000000), which indicates how many characters there will be next.
Then n lines, one character for each line.
###Output format:
For each character, if it is a case letter, the ASCII value will be output; otherwise, the "illegal" (without quotation marks) will be output
###Input example:
Here is a set of inputs. For example:
```in
three
A
b
#
```
###Output example:
The corresponding output is given here. For example:
```out
sixty-five
ninety-eight
illegal
```







answer:If there is no answer, please comment