Advertisement
Guest User

Untitled

a guest
May 2nd, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.59 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdio>
  3. #include <vector>
  4. #include <cstring>
  5. #include <set>
  6. #include <map>
  7. #include <algorithm>
  8. #include <complex>
  9. #include <iomanip>
  10.  
  11. using namespace std;
  12.  
  13. typedef complex<double> pt;
  14. typedef long long ll;
  15. typedef long double ld;
  16.  
  17. void run() {
  18.     string s;
  19.     cin >> s;
  20.    
  21.     for(int i = 0; i < 30; i++) {
  22.         string o = s;
  23.         for(int j = 0; j < s.size(); j++) {
  24.             int a = s[j]-'a';
  25.             a += i;
  26.             a %= 'z'-'a'+1;
  27.             o[j] = a + 'a';
  28.         }
  29.        
  30.         cout << o << endl;
  31.        
  32.        
  33.     }
  34. }
  35.  
  36. int main() {
  37.         cout << fixed << setprecision(16) << endl;
  38.         run();
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement