回复 10楼 return_0
如果是 20位的正整数呢?

https://zh.
2020-03-20 14:20
2020-03-20 14:21
2020-03-20 14:21
2020-03-20 14:21
2020-03-20 14:22
2020-03-20 14:22
2020-03-20 14:23

2020-03-20 14:24
程序代码:#include<stdio.h>
int main()
{
int nBit = 0;
int nSum = 0;
int ch;
while((ch = getchar()) != '\n')
{
++nBit;
nSum += ch - '0';
}
printf("%d %d", nBit, nSum);
return 0;
}

2020-03-20 14:25
2020-03-20 14:25