1029: [编程入门]自定义函数处理素数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,n; scanf("%d",&n); for(i=2;i*i<=n;i++) …… 题解列表 2024年11月16日 1 点赞 0 评论 537 浏览 评分:10.0
1029: [编程入门]自定义函数处理素数(python) 摘要:#### 1029: [编程入门]自定义函数处理素数(python) ~~~python def is_prime(n): for i in range(2, int(n**0.5)…… 题解列表 2024年10月23日 0 点赞 1 评论 225 浏览 评分:9.9
编写题解 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 评论 297 浏览 评分:0.0
巧用布尔型 摘要:解题思路::很简单,只需要设置一个布尔型变量即可,在自定义函数中,在2~n-1中遍历,凡是为整除的更新布尔型变量并返回即可注意事项:参考代码:#include<iostream>using names…… 题解列表 2024年09月10日 1 点赞 0 评论 282 浏览 评分:0.0
1029: [编程入门]自定义函数处理素数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;ll prime (ll x){ …… 题解列表 2024年06月30日 0 点赞 0 评论 194 浏览 评分:0.0
题解 1029: [编程入门]自定义函数处理素数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int sushu(int n){ int g; for(int i=2;i<=s…… 题解列表 2024年06月30日 0 点赞 0 评论 130 浏览 评分:0.0
1029: [编程入门]自定义函数处理素数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;ll prime(ll x){ f…… 题解列表 2024年06月08日 0 点赞 1 评论 145 浏览 评分:9.9
[编程入门]自定义函数处理素数 摘要:解题思路:注意事项:参考代码:def my_test(m): for i in range(2,m): if m%i==0: n = 1 …… 题解列表 2024年06月03日 0 点赞 0 评论 182 浏览 评分:9.9
编写题解 1029: [编程入门]自定义函数处理素数 摘要:解题思路:注意事项:参考代码:#include<stdio.h> #include<stdlib.h> int count(int num) { int i; for(i=…… 题解列表 2024年05月28日 0 点赞 0 评论 217 浏览 评分:0.0
1029判断素数(使用 i * i) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>void sushu(int n){ if(n==1) { printf("not prime"); } else { int f…… 题解列表 2024年05月14日 0 点赞 0 评论 360 浏览 评分:0.0