TNVFC1L - Letters
We build the infinite sequence of uppercase letters (A-Z) which starts with single-letter strings (A, B, ..., Z), continues with two-letter strings (AA, AB, ..., AZ, BA, BB, ..., BZ, ..., ZZ), then three letter strings and so on. The same-length strings are ordered lexicographically. We are interested in finding which letter sits at a given index in the sequence.
Input
The letter index, ranging between 0 and 2*10^9.
Output
The letter at the specified index.
Example
Input:
0 25 50 100 250 500 1000
Output:
A Z A B E J S
hide comments
:D:
2017-09-26 19:36:23
Alternatively a judge can be changed to binary. |
|
[Rampage] Blue.Mary:
2017-09-23 06:23:55
This should be put into "partial" section, because it doesn't use binary judge. |
Added by: | BIDV |
Date: | 2017-09-22 |
Time limit: | 0.300s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All |