1 solutions

  • 0
    @ 2025-12-3 16:27:16

    C++ :

    #include<iostream>
    #include<algorithm>
    #include<cstdio>
    #include<cmath>
    #include<cstring>
    #include<vector>
    #include<queue>
    #include<map>
    using namespace std;
    //const long long N=;
    long long l,gs,sy;
    string st;
    int main()
    {
    	cin>>st;
    	l=st.size();
    	gs=1; sy=1;
    	for (int i=0;i<l;i++)
    	{
    		sy--;
    		if (sy==0) cout<<st[i],sy=++gs;
    	}
    	return 0;
    }
    
    
    • 1

    Information

    ID
    883
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    10
    Tags
    # Submissions
    4
    Accepted
    1
    Uploaded By