1157:亲和数(c语言) 摘要:解题思路:先求出A,B的约数,加起来看看能不能分别和另一个数相等。注意事项:参考代码:#include <stdio.h> int main () { int M, A, B; …… 题解列表 2023年01月31日 0 点赞 0 评论 184 浏览 评分:9.9
1157 亲和数 利用函数解决 摘要:#include<stdio.h>#include<math.h>int fun(int n){ int i,a,b,c,m,sum=0; m=sqrt(n);//可提高效率 for(i=2;i<=…… 题解列表 2023年02月01日 0 点赞 0 评论 135 浏览 评分:9.9
亲和数(水题) 摘要:```c #include long long f(int n){ long long i,sum=0; for(i=1;i…… 题解列表 2023年02月02日 0 点赞 0 评论 190 浏览 评分:0.0
亲和数——一个数的因子和等于另一个数 摘要:解题思路:注意事项:前面那个数的因子和不包括它本身参考代码:def yzh(n): L = [1] for i in range(2,n): if n%i == 0: …… 题解列表 2023年03月19日 0 点赞 0 评论 174 浏览 评分:0.0
1157:亲和数 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<math.h>using namespace std;int f(int t){ int sum=1,k; for(…… 题解列表 2023年04月02日 0 点赞 0 评论 185 浏览 评分:0.0
1157: 亲和数 摘要:解题思路:注意事项:参考代码:import java.util.Scanner; public class Dome19 { public static void main(String…… 题解列表 2023年04月13日 0 点赞 0 评论 181 浏览 评分:9.9
1157: 亲和数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int zys(int x){ int sum=0; for(int…… 题解列表 2023年09月09日 0 点赞 0 评论 132 浏览 评分:9.9
最简洁的代码 摘要:def divisor_sum(n): return sum(i for i in range(1, n) if n % i == 0) def is_True(a, b): r…… 题解列表 2023年10月15日 0 点赞 0 评论 281 浏览 评分:9.9
亲和数题解 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int is_qhs(int a,int b){ int sum1=0; int sum2=0; for(int…… 题解列表 2023年12月01日 0 点赞 0 评论 92 浏览 评分:9.9
c语言亲和数 摘要:#include int main() { int a; int m,n; scanf("%d",&a); for(int i=0;i…… 题解列表 2023年12月19日 0 点赞 0 评论 135 浏览 评分:9.9