蒟蒻的代码请神犇看一看
查看原帖
蒟蒻的代码请神犇看一看
468104
PGC_tree楼主2021/2/7 21:48
#include <stdio.h>
#include <math.h>
int main ()
{
	int n=0,w=0;
	scanf("%d",&n);
	for(int i=0;n==0;i)
	{
		if(n%10==1) w++;
		n=n/10;
	}
	printf("%d",w);
	return 0;
}

Dev-c++没过,所以还没有提交到洛谷上。

2021/2/7 21:48
加载中...