#include <iostream> using namespace std; #define I int #define LL long long void length1(); void str1() ; int main() { str1() ; return 0; } void str1() { //字符串分隔 char a; I t = 0; while (cin >> a) { t = (t + 1) % 8; cout << a; if (! t) cout << "\n"; } for (; t < 8&& t > 0; t++) cout << 0; } //用while循环获取输入流的字母,然后每隔8个换行,(用t计数,判断该行已输出的字母个数,t对8取模)。输入结束后,如果t不为0,则剩下的位置用0补上