Advertisement
ShafiulAzim

codeforces 1095A

Feb 14th, 2020
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. int n,i,j,x=0,s=0;
  6. cin>>n;
  7. char ch[n];
  8. cin>>ch;
  9. for(i=1;s<n;i++){
  10. s+=i;
  11. cout<<ch[s-1];
  12. }
  13.  
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement