编写题解:分解质因数【Python】 摘要:解题思路:首先自定义函数判断是否为质数;分解质因数时:先找最小质因数flag,然后递归找n//flag的最小质因数参考代码:# 自定义函数来判断是否是质数 def isPrime(n): …… 题解列表 2022年12月07日 0 点赞 0 评论 419 浏览 评分:9.9
雇佣兵(while循环) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int m,n,x,i,a; scanf("%d %d %d",&m,&n,&x…… 题解列表 2022年12月07日 0 点赞 0 评论 455 浏览 评分:0.0
很简单的一种思路,可以不用到数组 摘要:```c //思路是先把A的因子和算出来得出B,然后判断B的因子和是否等于A,是则是亲密数 #include int main() { for(int a=2;a…… 题解列表 2022年12月07日 0 点赞 0 评论 428 浏览 评分:2.0
编写题解:数的读法【Python】 摘要:解题思路:每四位分开读,具体见代码和注释参考代码:d = {'1':'yi', '2':'er', '3':'s…… 题解列表 2022年12月07日 0 点赞 0 评论 637 浏览 评分:10.0
3074: 计算(calc) 摘要:参考代码: ```cpp #include using namespace std; stacknum;//存储数字 stackch;//存储字符 string str;//定义字符串 …… 题解列表 2022年12月07日 0 点赞 0 评论 586 浏览 评分:9.9
1017: [编程入门]完数的判断 摘要:```cpp #include int n,i,sum=0,a[1000],j=0; void yin(int n) { j=0; sum=0; for(i=1;i…… 题解列表 2022年12月07日 0 点赞 0 评论 366 浏览 评分:0.0
1021: [编程入门]迭代法求平方根 摘要:```cpp #include int main() { /* 没按题目要求走,求平方根用sqrt()直接就求了,过了就行 */ double a; scanf("%lf",&a)…… 题解列表 2022年12月07日 0 点赞 0 评论 628 浏览 评分:6.0
1065: 二级C语言-最小绝对值 摘要:```cpp #include using namespace std; int a[10],ha[10],i,t; int main() { for(i=0;i…… 题解列表 2022年12月07日 0 点赞 0 评论 341 浏览 评分:0.0
津津的储蓄计划(一个while解法) 摘要:解题思路:注意事项:参考代码:#includeint main(){ int n,m=0,a=12,x=0;//m表示每个月剩下的钱,n表示每个月的预算花费,x表示给妈妈的钱 while(a--) {…… 题解列表 2022年12月07日 0 点赞 1 评论 407 浏览 评分:0.0
奇偶ASCII值判断 (Java) 摘要:import java.util.Scanner; public class Main { public static void main(String[] args) { S…… 题解列表 2022年12月07日 0 点赞 1 评论 730 浏览 评分:9.9