Logo
(追記) (追記ここまで)

34364번 - MIR Cipher 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB133937968.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:

  • An integer 1ドル \leq N \leq 60$ representing the number of letters in the message to follow.
  • A string of length $N$ consisting of only uppercase letters in the English alphabet (A-Z).

출력

Output one line with the decoded string in all upper-case letters.

제한

예제 입력 1

10 GCHDYQCTPL

예제 출력 1

HELLOWORLD

힌트

출처

School > CS@Mines > CS@Mines HSPC 2023 > Beginner C번

  • 문제를 만든 사람: Ryan Manley
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /