题解 | #字符串分隔#
字符串分隔
https://www.nowcoder.com/practice/d9162298cb5a437aad722fccccaae8a7
#include <stdio.h>
#include <string.h>
int main() {
char* string = (char*)malloc(sizeof(char) * 5000);
while (scanf("%8s", string) != EOF) { // 注意 while 处理多个 case
if(strlen(string)==0) continue;
printf("%s", string);
int total = 8 - strlen(string);
for (int i = 0; i < total; i++) {
printf("0");
}
printf("\n");
}
return 0;
}

