Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
418 B
0
Indexable
Never
#include <iostream>
#include <string>
using namespace std;

string change(int n, string str)
{
    string result;
    str[n - 1] = 0;
    for (int i = 0; i < str.length(); i++)
    {
        if (str[i] != 0)
        {
            result += str[i];
        }
    }
    return result;
}

int main()
{
    string str;

    int n;
    cin >> n;
    cin >> str;

    cout << change(n, str);
}