We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0944c20 commit 3d5bf62Copy full SHA for 3d5bf62
1840A - Cipher Shifer.cpp
@@ -0,0 +1,33 @@
1
+// ॐ नमः शिवाय
2
+#include<bits/stdc++.h>
3
+using namespace std;
4
+#define ll long long
5
+
6
+// Code Written By: Vikash Patel
7
+// Codeforces Profile: https://codeforces.com/profile/vikashpatel
8
9
+int main()
10
+{
11
+ int t;
12
+ cin>>t;
13
+ while(t--)
14
+ {
15
+ int n;
16
+ cin>>n;
17
+ string s;
18
+ cin>>s;
19
+ string ans;
20
+ char temp = s[0];
21
+ for(int i=1; i<n; i++)
22
23
+ if(temp == s[i])
24
25
+ ans += s[i];
26
+ temp = s[i+1];
27
+ i++;
28
+ }
29
30
+ cout<<ans<<endl;
31
32
+ return 0;
33
+}
0 commit comments