原题链接:https://www.acwing.com/problem/content/74/
substr用法
#include <iostream>
using namespace std;
string leftRotateString(string str,int n){
return str.substr(n,str.length()) + str.substr(0,n);
}
int main(void) {
int n;
cin >> n;
string str = "hello";
string str1 = leftRotateString(str,n);
cout << str1 << endl;
}