#include<bits/stdc++.h>
using namespace std;
int main() {
string str = "";
while(cin >> str) {
string ans = "";
for(int ii = 0; ii < str.size(); ii += 8) {
if(ii + 8 <= str.size()) cout << str.substr(ii, 8) << endl;
else {
string temp = str.substr(ii, str.size() - ii);
for(int jj = str.size() - ii + 1; jj <= 8; jj++) {
temp += '0';
}
cout << temp << endl;
}
}
}
return 0;
}
【华为笔试题 C++】HJ4 字符串分隔
最新推荐文章于 2024-04-27 00:04:39 发布