题解 | #字符串分隔#
字符串分隔
https://www.nowcoder.com/practice/d9162298cb5a437aad722fccccaae8a7
#include <stdio.h>
int main() {
char s[100]={0};
gets(s);
int len=strlen(s);
for(int i=0;i<len;i++)
{
printf("%c",s[i]);
if((i+1)%8==0)
printf("\n");
}
if(len%8!=0)
{
int j=8-len%8;
while(j)
{
printf("%d",0);
j--;
}
}
return 0;
}


查看10道真题和解析