完数的判断(Python) 摘要:解题思路:注意事项:要保证时间限制的情况下不能通过暴力求解参考代码:N = int(input())for i in range(2, N) : lst_factors = [1] lim…… 题解列表 2022年11月04日 1 点赞 0 评论 353 浏览 评分:10.0
java--study||O.o 摘要:参考代码:import java.util.Scanner; public class Main { public static void main(String[] args) { …… 题解列表 2024年05月15日 0 点赞 0 评论 341 浏览 评分:10.0
完数的判断C语言 摘要:解题思路:这个思路我都写在代码里了每段代表什么,如果有哪里不懂,欢迎评论区见注意事项:我用i*i<n是因为他因子一般成对出现,可以优化算法,让算法的运行速度更快参考代码:#include <stdio…… 题解列表 2024年11月06日 3 点赞 0 评论 375 浏览 评分:10.0
使用循环嵌套解决 摘要:解题思路:从整数1一直遍历到n,依次判断1到n内有多少个完数,根据完数的定义求解注意事项:注意格式控制符,很容易在这里出错参考代码:#include<bits/stdc++.h>using…… 题解列表 2025年04月07日 1 点赞 0 评论 516 浏览 评分:10.0
T1017 完数判断 摘要:解题思路:注意事项:参考代码:n=int(input())for a in range(2,n+1,2): b=[1] for i in range…… 题解列表 2025年05月04日 0 点赞 0 评论 374 浏览 评分:10.0
使用C语言完美解决完数判断 摘要:解题思路:通过循环试除来确定某个数是不是完数注意事项:参考代码:#include<stdio.h>int main(){ int num = 0;scanf(&qu…… 题解列表 2025年07月31日 1 点赞 0 评论 100 浏览 评分:10.0
C语言程序设计教程(第三版)课后习题6.7 (C++代码) 摘要:解题思路:注意事项:参考代码:#include <cstdio>int main(){ int n; scanf("%d",&n); int sum=0; int i[1005…… 题解列表 2017年07月28日 0 点赞 0 评论 1441 浏览 评分:9.9
[编程入门]完数的判断-题解(C语言代码) 暴力列举 摘要: ```c include inline int pd(int c, int *b); int main() { int a = 0,c=0,e=0,f=1,g=0; int b…… 题解列表 2019年10月08日 0 点赞 0 评论 2279 浏览 评分:9.9
[编程入门]完数的判断-题解(C语言代码) 摘要:```c #include int main() { double a; int c,b,n,x,s=0; scanf("%d",&n); f…… 题解列表 2019年11月03日 0 点赞 3 评论 1273 浏览 评分:9.9
[编程入门]完数的判断-题解(C语言代码) 摘要:完数即完全数(Perfect number),又称完美数或完备数,是一些特殊的自然数。它所有的真因子(即除了自身以外的约数)的和(即因子函数),恰好等于它本身。 ```c #include in…… 题解列表 2020年01月05日 0 点赞 2 评论 1695 浏览 评分:9.9