#t220. 输出字母的ASCII值

输出字母的ASCII值

ASCII Value of a Letter

Problem Background

Special for beginners, ^_^

Problem Description

Input a character and output its ASCII value.

Input Format

A single character.

Output Format

A single integer, the ASCII value of this character.

Sample Input

a

Sample Output

97

Constraints

Time limit: 1s, memory limit: 1024KiB for each test case.

Hint

  • The input is a character (read with char), and the output is its ASCII code.
  • A character and its integer code can be converted into each other — cast the char to int and print it, and that is its code ((int)c).
  • Verify with the sample: a → 97.