题解 | #字符串分隔#
字符串分隔
https://www.nowcoder.com/practice/d9162298cb5a437aad722fccccaae8a7
#include <iostream>
using namespace std;
int main() {
string in;
getline(cin,in);
int len=in.length();
int outlen=((len-1)/8 +1)*8;
for(int i = 0;i<outlen;i++)
{
if(i%8==0 && i!=0)
{
cout<<"\n";
}
if(i<len)
{
cout<<in[i];
}
else
{
cout<<'0';
}
}
}
// 64 位输出请用 printf("%lld")
