完数的判断,开始看看了 摘要:解题思路:注意事项:参考代码:import math#完数n=int(input())for i in range(2,n+1):#1到N之间的完数,1的因数是本身,完数的因数不包含本身 …… 题解列表 2025年04月09日 0 点赞 0 评论 111 浏览 评分:0.0
找完数(C) 摘要:解题思路:先判断完数,再找因子,程序虽然时间上不是最短,但是思路简单注意事项:参考代码:#include<stdio.h>int Isright(int n);int main(){&nb…… 题解列表 2025年03月18日 3 点赞 0 评论 352 浏览 评分:0.0
完数的判断 摘要:解题思路:目的是找出从 2 到用户输入的 n 之间的所有完全数,并打印出每个完全数及其因子。外层的 for 循环从 2 迭代到 n ,对每个数 i 进行检查。内层的 for 循环计算…… 题解列表 2024年12月24日 0 点赞 0 评论 769 浏览 评分:0.0
[编程入门]完数的判断 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int isperfect(int num) { // 判断是不是完数 int i, sum = 0; for …… 题解列表 2024年12月05日 1 点赞 0 评论 537 浏览 评分: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 评论 501 浏览 评分:0.0
完数的判断 摘要:解题思路:for循环历遍所有数,每个数判断是否为 完数,即此数=因子之和,(与该数相除的余数为0的数为此数的因子),然后输出要求的数据注意事项:参考代码:#include <stdio.h> int …… 题解列表 2024年11月26日 0 点赞 0 评论 421 浏览 评分:0.0
无限套娃,嵌套嵌套再嵌套 摘要:解题思路:无限套娃注意事项:参考代码:#include <stdio.h>#include <stdlib.h>int main() { int n,i,j,s,sum,p; scanf("%d",&…… 题解列表 2024年11月26日 1 点赞 0 评论 296 浏览 评分:9.9
1017: [编程入门]完数的判断 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int i, j, n, sum; cin >>…… 题解列表 2024年11月23日 0 点赞 0 评论 230 浏览 评分:0.0
普普通通的解题方法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main (){ int n, j, a[1001],l; scanf("%d",&n); for ( j = 1; j …… 题解列表 2024年11月23日 1 点赞 0 评论 166 浏览 评分:0.0
最普通的解题方法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,i,j,s; scanf("%d",&a); for(i=2;i<=a;i++) …… 题解列表 2024年11月13日 0 点赞 0 评论 129 浏览 评分:0.0