题解 | #字符串分隔#
字符串分隔
https://www.nowcoder.com/practice/d9162298cb5a437aad722fccccaae8a7
搬运大佬的代码,简洁明了有效
#include<stdio.h>
#include<string.h>
int main()
{
char str[100];
while(scanf("%8s", str) != EOF)
{
int len = 8 - strlen(str);
printf("%s", str);
for(int i = 0; i < len; i++)
printf("0");
printf("\n");
}
}
查看18道真题和解析
