Nyoj-shift Password

Source: Internet
Author: User

Nyoj-shift Password
Shift password time limit: 1000 MS | memory limit: 65535 KB difficulty: 0

Description

The shift password is the simplest alternative to the password. The specific algorithm is to shift the letter of the alphabet to k places (k <26) Right and perform a modulo operation on the letter length.

Here is a string of ciphertext consisting of uppercase letters. It is known that the encryption process is to shift each letter right k digits in alphabetical order.

Encryption function: E (m) = (m + k) % q.

Decrypt the plaintext!

Input
The input contains multiple groups of test data (less than 1000 groups ).
Each group of data contains a string and an integer k (k <26) separated by spaces. All strings are composed of uppercase letters. The length is less than 50, and k indicates the number of digits that move to the right.
Output
The plaintext corresponding to each set of ciphertext is output, and each group of output occupies one line.
Sample Input
JMPWFZPV 1
Sample output
ILOVEYOU
Source

Password Series

#include
     
       #include
      
       int main(){int k;char str[55];while(~scanf("%s",str)){int len=strlen(str),i;scanf("%d",&k);for(i=0;i
       
        

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.