巧用for循环

博约8486  •  5小时前


include<bits/stdc++.h>

using namespace std; int main(){

string s;
getline(cin, s);
int start = 0, step = 0;
cin >> start >> step;
for(int i = start; i < s.length(); i = i + step){
	cout << s[i];
}

}


评论:

请先登录,才能进行评论