Accepted
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-11-11 03:13:18
- Judged By
- Score
- 100
- Total Time
- 7ms
- Peak Memory
- 576.0 KiB