Untitled
Anonymous
plain_text
03/09/2023 6:09 PM
464 B
18
Indexable
#include <iostream>
#include <string>
using namespace std;
int main()
{
string str;
string result;
int n;
cin >> n;
cin >> str;
str[n - 1] = 0;
for (int i = 0; i < str.length(); i++)
{
if (str[i] != 0)
{
result += str[i];
}
}
cout << result;
}
Editor is loading...