시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 256 MB28316814760.000%

문제

James Pond is a business man who often dreams he is a secret agent! He enjoys encrypting messages to his colleagues, who then have the task of decrypting them in order to read them. Your task is to write the decryption program for his staff to use.

Mr Pond uses the date as a key. He adds the day, month and year together, does a modulo 25 (remainder operator) on the answer and adds one to give him a value from 1 to 25 inclusive. This value, S, becomes the shift in his Caesar cypher.

In a Caesar cypher, each letter of a message is shifted S places forward through the alphabet, with z shifting to a where appropriate. For example, with a shift of 5, a becomes f, h becomes m and x becomes c. White space, punctuation and digits are not changed.

입력

Each message starts with the date as 3 integers on a single line, separated by spaces. A date of 0 0 0 marks the end of input.

The date is followed by a single line of at least 1 and no more than 250 characters; the line will not be just white space. Only lower case letters, spaces, punctuation marks and digits are used.

출력

For each message in the input, output a single line showing the decrypted message.

예제 입력 1

10 7 2015
uism aczm gwc izm zmilg nwz bpm kwvbmab wv 8bp.
12 5 12
n xmfqq gj ts mtqnifd sjcy bjjp xt rnxx rtsjditqqfw bnqq gj ns hmfwlj.
0 0 0

예제 출력 1

make sure you are ready for the contest on 8th.
i shall be on holiday next week so miss moneydollar will be in charge.

출처

ICPC > Regionals > South Pacific > South Pacific Region > New Zealand Programming Contest > NZPC 2015 F번

  • 문제의 오타를 찾은 사람: jaehoo1