题目 2518: 信息学奥赛一本通T1620-质因数分解 摘要:解题思路:质数:除1以外,这个数只能被它自己整除的数,是质数。最小的质数是2。质数有:2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71..…… 题解列表 2021年12月11日 0 点赞 3 评论 1165 浏览 评分:6.5
第一次发表,随便看看 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,j,n; scanf("%d",&n); for(i=2;i<n;i++) …… 题解列表 2023年02月05日 0 点赞 5 评论 774 浏览 评分:7.7
信息学奥赛一本通T1620-质因数分解 摘要:#include #include int isprime(int x) { int i=0; int t=sqrt(x); for(i=2;i…… 题解列表 2024年04月07日 0 点赞 0 评论 465 浏览 评分:8.0
质因数分解之暴力枚举 摘要:解题思路:枚举因数,比较取最大值注意事项:long long随意,枚举根号n即可参考代码:#include <iostream>#include <cmath>//不然用不了sqrt和max函数usi…… 题解列表 2024年02月02日 0 点赞 0 评论 453 浏览 评分:9.9
信息学奥赛一本通T1620-质因数分解(C++代码) 摘要:参考代码:#include<iostream>using namespace std;int findLargerPrimeFactor(int n) { int largerPrime = 0…… 题解列表 2023年07月12日 0 点赞 0 评论 453 浏览 评分:9.9
java--study||O.o 摘要:参考代码:import java.util.Arrays; import java.util.Scanner; public class Main { public static voi…… 题解列表 2024年01月14日 0 点赞 0 评论 526 浏览 评分:9.9
2518: 信息学奥赛一本通T1620-质因数分解 摘要:解题思路:注意事项:数学有点差,最开始并没有想到两个不同质数的乘积,能够将它整除出来的只可能是质数。导致时间超时。因为只有两个数,只要求出第一个质数就能够算出另一个质数参考代码:import math…… 题解列表 2023年02月15日 0 点赞 0 评论 714 浏览 评分:9.9
2518: 信息学奥赛一本通T1620-质因数分解 摘要:``` #include using namespace std; int main(){ int r,sum=0; cin>>r; int a = r; …… 题解列表 2023年11月19日 1 点赞 0 评论 418 浏览 评分:9.9
2518: 信息学奥赛一本通T1620-质因数分解 摘要:解题思路:注意事项:参考代码:import mathdef is_qurt(n): flag = True for i in range(2,int(math.sqrt(n))+1): …… 题解列表 2024年07月31日 0 点赞 0 评论 691 浏览 评分:9.9
2518: 信息学奥赛一本通T1620-质因数分解 摘要:解题思路:注意事项:参考代码:def isprime(x): lt=[2,3,5,7] ls=['1','3','7','9…… 题解列表 2022年04月20日 0 点赞 0 评论 1013 浏览 评分:9.9