题解 2829: 数1的个数 摘要:解题思路:可以用while拆解个各位,比较通用,但是本题说明了是10000以内的数,就用了简单拆分注意事项:注意逻辑或||造成的短路问题,使用||时只要有一个条件满足就会count++,但是这个数会不…… 题解列表 2025年12月07日 1 点赞 0 评论 68 浏览 评分:10.0
编写题解 2829: 数1的个数 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main(){ int n,x,i,count=0,t; scanf("%d",&n); fo…… 题解列表 2023年01月01日 0 点赞 1 评论 638 浏览 评分:8.4
数1的个数,题目短吗 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,n,c,y,x,h; int count=0,b=0; scanf("%d",&n…… 题解列表 2024年01月14日 0 点赞 0 评论 354 浏览 评分:6.0
题解 2829: 数1的个数 摘要:解题思路:额……自己理解,学了循环的应该都会吧,我不解释了\^w^/。注意事项:别抄我的,抄我的人我诅咒他电脑10秒关机参考代码:#include<bits/stdc++.h>#include<win…… 题解列表 2024年02月24日 0 点赞 0 评论 391 浏览 评分:6.0
(c语言)详细解读 摘要:解题思路:注意事项: 参考代码:#include"stdio.h"int main(){ int num=0,n=0,Num=0; scanf("%d",&num); for(;nu…… 题解列表 2023年01月03日 0 点赞 0 评论 410 浏览 评分:0.0
while循环又来咯,这个还是除余思想 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,k=0; //k,1的个数 scanf("%d",&n); for(int …… 题解列表 2023年01月19日 0 点赞 0 评论 340 浏览 评分:0.0
编写题解 2829: 数1的个数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ long long n,sum=0; cin>…… 题解列表 2024年02月27日 0 点赞 0 评论 274 浏览 评分:0.0
超级复杂的方法,不建议参考. 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,n,a=0,b=0,c=0,d=0,e=0,j=0; scanf("%d",&n); …… 题解列表 2024年11月27日 0 点赞 0 评论 214 浏览 评分:0.0
C题解 2829: 数1的个数 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ long long a,b=0; scanf("%…… 题解列表 2025年01月26日 0 点赞 0 评论 253 浏览 评分:0.0
易于理解-数1的个数-for、while结合 摘要:解题思路:注意事项:参考代码:#include<stdio.h>intmain(){intn,a=0,i…… 题解列表 2025年02月18日 0 点赞 0 评论 354 浏览 评分:0.0