1253-Caesar Ciphar

 avatar
kaziamir
c_cpp
a year ago
390 B
0
Indexable
Never
#include<bits/stdc++.h>
using namespace std;

int main(){
    int N;
    cin>>N;
    while(N--){
    	string sent;
    	cin>>sent;
    	int num = 0;
    	cin>>num;
    	
    	 for(int i=0;i<sent.size();i++){
    		for(int j=0;j<num;j++){
    			if(sent[i]=='Z'){
    				sent[i]=='X';
    				//j++;
				}
				sent[i]--;
			}
			cout<<sent[i];
		}	
		cout<<endl;   
	   
	}

    return 0;
}