#include <iostream>
#include <cstdio>
#include <string>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <stack>
#include <queue>
#include <set>
#include <map>
using namespace std;
const int maxn = 100001;
int main()
{
freopen("1.txt","r",stdin);
string s;
cin>>s;
int t = s.size() + 2;
int n1,n2,n3;
n1 = n3 = t/3;
n2 = t - n1 -n3;
int ind = 0,ind1 = t - 3;
for(int i = 0;i<n1;i++)
{
if(i != n1 - 1)
for(int j = 0;j<n2;j++)
{
if(j == 0)
cout<<s[ind++];
else if(j == n2 - 1)
cout<<s[ind1--]<<endl;
else
cout<<" ";
}
else
{
for(int j = 0;j<n2;j++)
{
cout<<s[ind++];
}
}
}
return 0;
}
1031 Hello World for U (20分)
最新推荐文章于 2021-01-11 21:11:46 发布