编写题解 1017: [编程入门]完数的判断 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int get(int n,int facs[]){ if(n<6){ return 0; } int sum=0;…… 题解列表 2025年11月22日 0 点赞 0 评论 34 浏览 评分:0.0
两个for循环解决问题 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,j,k,sum,n; scanf(&…… 题解列表 2025年11月03日 3 点赞 1 评论 185 浏览 评分:0.0
1017:完数的判断-C语言 摘要:解题思路:注意事项:参考代码:int isRight(int n){ int sum=0; int i; for(i=1;…… 题解列表 2025年10月23日 0 点赞 0 评论 344 浏览 评分:0.0
使用C语言完美解决完数判断 摘要:解题思路:通过循环试除来确定某个数是不是完数注意事项:参考代码:#include<stdio.h>int main(){ int num = 0;scanf(&qu…… 题解列表 2025年07月31日 1 点赞 0 评论 534 浏览 评分:10.0
完数的判断,开始看看了 摘要:解题思路:注意事项:参考代码:import math#完数n=int(input())for i in range(2,n+1):#1到N之间的完数,1的因数是本身,完数的因数不包含本身 …… 题解列表 2025年04月09日 0 点赞 0 评论 666 浏览 评分:0.0
找完数(C) 摘要:解题思路:先判断完数,再找因子,程序虽然时间上不是最短,但是思路简单注意事项:参考代码:#include<stdio.h>int Isright(int n);int main(){&nb…… 题解列表 2025年03月18日 3 点赞 0 评论 1052 浏览 评分:0.0
完数的判断 摘要:解题思路:目的是找出从 2 到用户输入的 n 之间的所有完全数,并打印出每个完全数及其因子。外层的 for 循环从 2 迭代到 n ,对每个数 i 进行检查。内层的 for 循环计算…… 题解列表 2024年12月24日 2 点赞 0 评论 1146 浏览 评分:0.0
[编程入门]完数的判断 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int isperfect(int num) { // 判断是不是完数 int i, sum = 0; for …… 题解列表 2024年12月05日 1 点赞 0 评论 859 浏览 评分:0.0
完数判断常规做法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int N; int s; scanf("%d",&N); for(int n=1;n<=N;n++) { s…… 题解列表 2024年12月01日 3 点赞 0 评论 720 浏览 评分:0.0
完数的判断 摘要:解题思路:for循环历遍所有数,每个数判断是否为 完数,即此数=因子之和,(与该数相除的余数为0的数为此数的因子),然后输出要求的数据注意事项:参考代码:#include <stdio.h> int …… 题解列表 2024年11月26日 0 点赞 0 评论 675 浏览 评分:0.0