题解 1017: [编程入门]完数的判断

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

c++ 400ms以内

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n; cin >> n; for (i……

两个for循环解决问题

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,j,k,sum,n; scanf(&……

使用C语言完美解决完数判断

摘要:解题思路:通过循环试除来确定某个数是不是完数注意事项:参考代码:#include<stdio.h>int main(){ int num = 0;scanf(&qu……

T1017 完数判断

摘要:解题思路:注意事项:参考代码:n=int(input())for a in range(2,n+1,2): b=[1] for i in range……

完数的判断,开始看看了

摘要:解题思路:注意事项:参考代码:import math#完数n=int(input())for i in range(2,n+1):#1到N之间的完数,1的因数是本身,完数的因数不包含本身 ……

使用循环嵌套解决

摘要:解题思路:从整数1一直遍历到n,依次判断1到n内有多少个完数,根据完数的定义求解注意事项:注意格式控制符,很容易在这里出错参考代码:#include<bits/stdc++.h>using……

找完数(C)

摘要:解题思路:先判断完数,再找因子,程序虽然时间上不是最短,但是思路简单注意事项:参考代码:#include<stdio.h>int Isright(int n);int main(){&nb……