十分简单,一看就会 摘要:参考代码:#include<stdio.h>int main(){ int n,k=0; int num,a[100]; scanf("%d",&n); for(int i=1;i<n;i++){ …… 题解列表 2024年08月14日 0 点赞 0 评论 467 浏览 评分:0.0
无聊的星期六 摘要:解题思路:注意事项:参考代码:N=int(input()) for z in range(6,N): if z % 10 == 6 or z % 10 == 8: num…… 题解列表 2024年09月09日 0 点赞 0 评论 963 浏览 评分: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 评论 430 浏览 评分: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 评论 462 浏览 评分:0.0
完数的判断 摘要:解题思路:for循环历遍所有数,每个数判断是否为 完数,即此数=因子之和,(与该数相除的余数为0的数为此数的因子),然后输出要求的数据注意事项:参考代码:#include <stdio.h> int …… 题解列表 2024年11月26日 0 点赞 0 评论 936 浏览 评分:0.0
完数的判断(C++) 摘要:解题思路:双重for循环注意事项:sum每循环一轮重新归零注意变量的适用范围以上为本人敲代码时发生的错误,共勉!参考代码:#include<iostream>using namespace std;i…… 题解列表 2024年11月28日 6 点赞 0 评论 927 浏览 评分: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 评论 941 浏览 评分:0.0
[编程入门]完数的判断 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int isperfect(int num) { // 判断是不是完数 int i, sum = 0; for …… 题解列表 2024年12月05日 1 点赞 0 评论 1059 浏览 评分:0.0
完数的判断 摘要:解题思路:目的是找出从 2 到用户输入的 n 之间的所有完全数,并打印出每个完全数及其因子。外层的 for 循环从 2 迭代到 n ,对每个数 i 进行检查。内层的 for 循环计算…… 题解列表 2024年12月24日 2 点赞 0 评论 1411 浏览 评分:0.0
简单易于理解的完数的判断问题——Python 摘要:解题思路: 1.从6开始循环能够减少运行时间 2.通过pow()函数,只需要对完数进行求根,研究一半即可 &…… 题解列表 2025年01月31日 0 点赞 0 评论 800 浏览 评分:0.0