1029: [编程入门]自定义函数处理素数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;ll prime (ll x){ …… 题解列表 2024年06月30日 0 点赞 0 评论 215 浏览 评分:0.0
巧用布尔型 摘要:解题思路::很简单,只需要设置一个布尔型变量即可,在自定义函数中,在2~n-1中遍历,凡是为整除的更新布尔型变量并返回即可注意事项:参考代码:#include<iostream>using names…… 题解列表 2024年09月10日 1 点赞 0 评论 319 浏览 评分:0.0
编写题解 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 评论 365 浏览 评分:0.0
通用的思维写出的 摘要:解题思路:注意事项:参考代码: public class Test { public static void main(String[] args) { Scanner …… 题解列表 2024年12月15日 1 点赞 0 评论 469 浏览 评分:0.0
自定义函数处理素数 摘要:#include<stdio.h> int judge(int n); int main(void) { int n; while(scanf("%d", &n)) …… 题解列表 2024年12月28日 2 点赞 0 评论 901 浏览 评分:0.0
1029: [编程入门]自定义函数处理素数 摘要:解题思路:注意事项:这道题其实使用bool类型传回更好,在main方法输出比在方法中输出结构要更清晰一点参考代码:publicstaticvoidmain(Stri…… 题解列表 2025年04月16日 1 点赞 0 评论 238 浏览 评分: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 评论 191 浏览 评分:0.0