编写题解 1029: [编程入门]自定义函数处理素数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>void fun(int a){ for(int i=2;i<=a/2;i++){ if (a%i==0){prin…… 题解列表 2024年09月29日 1 点赞 0 评论 480 浏览 评分:0.0
通用的思维写出的 摘要:解题思路:注意事项:参考代码: public class Test { public static void main(String[] args) { Scanner …… 题解列表 2024年12月15日 1 点赞 0 评论 576 浏览 评分:0.0
自定义函数处理素数 摘要:#include<stdio.h> int judge(int n); int main(void) { int n; while(scanf("%d", &n)) …… 题解列表 2024年12月28日 3 点赞 0 评论 1150 浏览 评分:0.0
1029: [编程入门]自定义函数处理素数 摘要:解题思路:注意事项:这道题其实使用bool类型传回更好,在main方法输出比在方法中输出结构要更清晰一点参考代码:publicstaticvoidmain(Stri…… 题解列表 2025年04月16日 1 点赞 0 评论 452 浏览 评分:0.0
T1029 素数处理--7行解决 摘要:解题思路:注意事项:参考代码:n=int(input())def f(n): for i in range(2,int(n ** 0.5) + 1)…… 题解列表 2025年05月05日 0 点赞 0 评论 425 浏览 评分:0.0
判断素数遍历 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,j; int x; &n…… 题解列表 2025年09月16日 0 点赞 0 评论 331 浏览 评分:0.0
1029:自定义函数处理素数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ void IsPrime(int n); int num; scanf(&…… 题解列表 2025年11月05日 1 点赞 0 评论 137 浏览 评分:0.0
简单简洁易懂 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int prime(int a) { int i,m=0; for(i=2;i<a;i++){ if(a%i==0)…… 题解列表 2025年11月06日 1 点赞 0 评论 198 浏览 评分:0.0
判断一个数是不是素数 摘要:解题思路:注意事项:参考代码#include <stdio.h>#include <math.h>int sushu(int n){ if(n<=1) return 0;…… 题解列表 2025年12月02日 0 点赞 0 评论 127 浏览 评分:0.0