oj mrJudge
Toggle navigation
  • Login
    • Forget Password
      Login
User Image

Hello, Stranger

Guest
  • Analysis Mode
  • Problems
    • All Problems
    • Latest Problems
  • Join Us Now
  • Registration
  • Contact Us
  • Infomation
  • About
    • Terms of Use
    • Technical Specifications
    • Credits

chartoint Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

chartoint.html

Mr A doesn't believe that characters are stored as integers. You want to prove him wrong.

Your Task:

Write a program to convert characters to their ASCII representation.

Input

The first line of input consists of a single number, n. This denotes the number of letters that follows. n is between 1 and 10000.

For the following n lines of input, there will be a single character in each line.

Output

Output the ASCII representation of the input in decimal (base 10) format.

Sample Input

5
a
b
C
d
e

Sample Output

97
98
67
100
101

Note

You can print the number out directly after you input it. No need to store everything.

Tags

String Processing

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
1100101s32MBAverage
2011s32MBAverage

Judge Compile Command

g++-8 ans.cpp -o chartoint -Wall -Wshadow -static -O2 -lm -m64 -s -w -std=gnu++17 -fmax-errors=512

Accepted Submissions

subIDUserTimeMax Time

Past Submissions

subIDUserTimeScore
mrJudge 09.05.20
Copyright © 2020 mrJudge. All rights reserved.