File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ // ॐ नमः शिवाय
2
+ #include < bits/stdc++.h>
3
+ using namespace std ;
4
+
5
+ #define ll long long
6
+ #define pb push_back
7
+ #define ff first
8
+ #define ss second
9
+ #define mp make_pair
10
+
11
+ // Code Written By: Vikash Patel
12
+ // Codeforces Profile: https://codeforces.com/profile/vikashpatel
13
+
14
+ void solve (){
15
+ string s;
16
+ cin >> s;
17
+ int n = s.size ();
18
+ for (int i = 0 ;i < n; ++i) {
19
+ if (i % 2 == 0 ) {
20
+ if (s[i] == ' a' )s[i] = ' b' ;
21
+ else s[i] = ' a' ;
22
+ } else {
23
+ if (s[i] == ' z' ) s[i] = ' y' ;
24
+ else s[i] = ' z' ;
25
+ }
26
+ }
27
+ cout << s << ' \n ' ;
28
+ }
29
+
30
+ int main ()
31
+ {
32
+ ios_base::sync_with_stdio (0 );
33
+ cin.tie (0 );
34
+ cout.tie (0 );
35
+
36
+ // #ifndef ONLINE_JUDGE
37
+ // freopen("input.txt", "r", stdin);
38
+ // freopen("/Users/vikash/Desktop/output.txt", "w", stdout);
39
+ // #endif
40
+
41
+ int t;
42
+ cin>>t;
43
+ while (t--)
44
+ {
45
+ solve ();
46
+ }
47
+ return 0 ;
48
+ }
You can’t perform that action at this time.
0 commit comments