/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 2ms 540.0 KiB
#2 Accepted 4ms 328.0 KiB
#3 Accepted 5ms 584.0 KiB

Code

#include <bits/stdc++.h>
using namespace std;
void slv_by_payel()
{
    string str_1;
    cin>>str_1;
    
    while (str_1.length() > 1)
    {
        string str_2;
        for (int i = 0; i < str_1.length(); i += 2)
        {
           str_2 += str_1[i]; 
        }
        str_1 = str_2; 
    }
    
    cout<<str_1<<endl;
}
int main()
{
    int tc;
    cin>>tc;
    while(tc--)
    {
        slv_by_payel();
    }
 
    return 0;
}

Information

Submit By
Type
Submission
Problem
P1080 String Algorithm
Contest
Bangladesh 2.0
Language
C++17 (G++ 13.2.0)
Submit At
2024-08-16 16:56:42
Judged At
2024-10-03 13:24:48
Judged By
Score
100
Total Time
5ms
Peak Memory
584.0 KiB