You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
#include<bits/stdc++.h>
|
|
|
|
|
using namespace std;
|
|
|
|
|
int main() {
|
|
|
|
|
//1<><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
string source = "1234567890";
|
|
|
|
|
int size=source.length();
|
|
|
|
|
cout << size << endl;
|
|
|
|
|
//2<><32>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD>װ
|
|
|
|
|
string target="";
|
|
|
|
|
while(true) {
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
if(source.length()==0) {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
target=target+source[0];
|
|
|
|
|
source=source.substr(1,source.length()-1);
|
|
|
|
|
if(source.length()>=2) {
|
|
|
|
|
source=source.substr(2,source.length()-2)+source.substr(0 , 2);
|
|
|
|
|
}
|
|
|
|
|
cout<<"source:"<<source<<endl;
|
|
|
|
|
cout<<"target:"<<target<<endl;
|
|
|
|
|
cout<<endl;
|
|
|
|
|
}
|
|
|
|
|
cout<<target<<endl;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|