#include <iostream>
#include <string>
using namespace std;
int main()
{
string message;
int columns;
while (true) {
cin >> columns;
if (columns != 0) {
cin >> message;
string result = "";
int interval;
int size = message.length();
int pointer;
int length = 2 * columns;
for (int i = 0; i < columns; ++i) {
result += message[i];
interval = length - 2 * i - 1;
pointer = i + interval;
while (pointer < size) {
result += message[pointer];
interval = length - interval;
pointer += interval;
}
}
cout << result << endl;
} else {
return 0;
}
}
return 0;
}
Sicily 1007. To and Fro
最新推荐文章于 2017-02-25 21:58:16 发布