Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <set>
- #include <queue>
- #include <vector>
- #include <cstring>
- using namespace std;
- int main() {
- int x;
- cin >> x;
- string s;
- cin >> s;
- for(int i = 0; i < (int) s.size(); i++) {
- int mesto = s[i] - 'a';
- mesto += x;
- if(mesto > 25) {
- mesto = 25 - (mesto - 25);
- }
- char c = mesto + 'a';
- cout << c;
- }
- cout << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment