Lyndon's Golf Contest 1 P1 - As Easy As ABC

View as PDF

Submit solution


Points: 0 (partial)
Time limit: 2.0s
Memory limit: 256M

Author:
Problem type
Allowed languages
C, C++

Everyone knows that there are 26 letters in the English alphabet. But can you calculate the position of any letter?

Given an uppercase letter, your task is to determine its position in the English alphabet.

Note: You may only submit to this problem in C/C++.

Input Specification

The first line of input contains a single uppercase letter c.

Output Specification

Output on a single line, the position of the letter c in the alphabet. For example, A = 1, B = 2, \dots, Z = 26.

Scoring

Your score will be computed based on the length of your source code, the shorter the better. For an L-byte program,

  • if L \le 36, you will receive the full 100 points.
  • if 37 \le L, you will receive \lfloor 2^{0.28(60-L)} \rfloor points.

Sample Input

K

Sample Output

11

Comments

There are no comments at the moment.