#include <iostream>
#include<vector>
using namespace std;
int main() {
char str[30] = { 0 };
cin.getline(str, sizeof(str));
int m;
cin >> m;
char* ptr = str;
char str2[30] = { 0 };
for(int i = 0;*(ptr+m-1)!='\0';i++)
{
str2[i] = str[m-1+i];
ptr++;
}
cout << str2 <<endl;
/*
vector<char> c; //使用容器时,要输出容器存储的值需要遍历
while(*(ptr+m-1)!='\0'){
c.push_back(*(ptr+m-1));
ptr ++;
}
for (const auto& ch : c) {//::表示在容器 c 中循环遍历元素
cout << ch ;
}
*/
return 0;
}

京公网安备 11010502036488号