Skip to content

Commit 2315246

Browse files
committed
Added 1095A - Repeating Cipher.cpp
1 parent 18c115f commit 2315246

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

1095A - Repeating Cipher.cpp

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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 n;
12+
cin>>n;
13+
string s;
14+
cin>>s;
15+
string ds;
16+
int c = 2;
17+
for(int i=0; i<n; )
18+
{
19+
ds += s[i];
20+
i += c;
21+
c++;
22+
}
23+
cout<<ds<<endl;
24+
return 0;
25+
}

0 commit comments

Comments
 (0)