Untitled
Anonymous
plain_text
03/09/2023 5:59 PM
432 B
17
Indexable
#include <iostream>
#include <vector>
#include <string>
using namespace std;
string func(string a,int k) {
string h = "";
for (int i = 0; i < k-1; i++){
h += a[i];
}
for (int i = k;i<a.size(); i++) {
h += a[i];
}
return h;
}
int main(){
string a; int b;
cin >> b >> a;
cout << func(a, b);
}
Editor is loading...