| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 2048 MB | 133 | 93 | 79 | 68.696% |
Mines Internet Radio (MIR) has recently been intercepting some weird transmissions, and they believe it is some type of encoded message. They have figured out how the messages can be decoded, but are having a hard time doing it by hand with the quantity they have received, so they've tasked you with creating a program to decode the messages.
They've identified the following procedure for decoding the the message they received.
The first letter of the message is shifted by 1ドル$ letter, with shifts wrapping around to the beginning of the alphabet. This means that an A would become a B, a B would become a C, etc. with a Z wrapping around to become an A. Each subsequent letter in the message is shifted by twice the amount of the previous letter, with shifts wrapping around the alphabet as with the first letter. This means the second letter in the message is shifted by 2ドル$ letters, so an A becomes a C, a B becomes a D, etc. all the way down to Y which would become an A and Z which would become B. The third letter of the message is shifted by 4ドル$ letters in a similar manner, and so on for the rest of the letters in the message.
Note that the shift amount could be more than the number of letters in the alphabet in which case you need to wrap around the alphabet multiple times.
You will be given one line of input consisting of two parts separated by a space:
Output one line with the decoded string in all upper-case letters.
10 GCHDYQCTPL
HELLOWORLD
School > CS@Mines > CS@Mines HSPC 2023 > Beginner C번