第n小的质数(缩小循环) 摘要:参考代码: ```c #include #include int main() { int n; scanf("%d",&n); int a=2,k=0;//k是累计出现的质数 …… 题解列表 2023年09月14日 0 点赞 0 评论 518 浏览 评分:0.0
使用埃氏筛法 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <stdbool.h>#define MAX 110000 // 第10000个…… 题解列表 2026年02月17日 0 点赞 0 评论 129 浏览 评分:0.0
2025/8/7刷题记录 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n; scanf("%d&qu…… 题解列表 2025年08月07日 0 点赞 0 评论 228 浏览 评分:0.0
判断一个数是否为质数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>//判断一个数是否为质数int&…… 题解列表 2025年02月18日 0 点赞 0 评论 415 浏览 评分:0.0
2832: 第n小的质数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int n,j,i,k=0; scanf("%d",&n); …… 题解列表 2024年11月07日 0 点赞 0 评论 402 浏览 评分:0.0
第n小的质数 摘要:解题思路:注意事项:参考代码:import mathn = int(input())flag = Truet = 0for i in range(2,100000): flag = True …… 题解列表 2024年07月31日 0 点赞 0 评论 395 浏览 评分:0.0
编写题解 2832: 第n小的质数 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;bool zs(int n){ for(int i=2;i<n/2+1;i++) {…… 题解列表 2024年05月30日 0 点赞 0 评论 367 浏览 评分:0.0
2832: 第n小的质数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int n,sum=0; cin>>n; …… 题解列表 2024年04月16日 0 点赞 0 评论 338 浏览 评分:0.0
编写题解 2832: 第n小的质数 摘要:解题思路:注意事项:参考代码:from math import sqrtimport mathn=int(input())c=[2]num=1while num<=n: for i in ran…… 题解列表 2024年03月04日 0 点赞 0 评论 396 浏览 评分:0.0
编写题解 2832: 第n小的质数 摘要:package test; //题目 2832: 第n小的质数 import java.util.Scanner; public class Main { public static void…… 题解列表 2024年01月27日 0 点赞 0 评论 267 浏览 评分:0.0