旧物有情 # 枚举法求素数 摘要:``` #include using namespace std; int main(){ int n; cin >> n; bool flag=true; …… 题解列表 2024年10月10日 3 点赞 0 评论 395 浏览 评分:9.9
旧物有情 # 枚举法求水仙花数 摘要:``` #include using namespace std; int main(){ //枚举所有三位数 for(int i=100; i…… 题解列表 2024年10月10日 0 点赞 0 评论 390 浏览 评分:9.9
旧物有情 # 遍历求二维数组转置 摘要:``` #include using namespace std; int main(){ int a[3][3]; for(int i=0; ia[i]…… 题解列表 2024年10月10日 1 点赞 0 评论 275 浏览 评分:9.9
旧物有情 # 模拟求最大公约数和最小公倍数 摘要:``` #include using namespace std; int main(){ int n,m; cin >> n >> m; …… 题解列表 2024年10月10日 3 点赞 0 评论 582 浏览 评分:9.9
旧物有情 # vector枚举法完数的判断 摘要:``` #include #include using namespace std; int main(){ //N的因子:可以整除N的数 //1 2 3 6 可以…… 题解列表 2024年10月10日 0 点赞 0 评论 295 浏览 评分:9.9
c语言方式解决 小九九 题目1671 摘要:解题思路:双重循环注意事项:打印算式的时候要注意空格的数量,以便对齐参考代码:#include<stdio.h>int main(){ int a,b,c;&nb…… 题解列表 2024年10月10日 0 点赞 0 评论 662 浏览 评分:9.9
[编程入门]有规律的数列求和 摘要:#[编程入门]有规律的数列求和 题目:有一分数序列: 2/1 3/2 5/3 8/5 13/8 21/13...... 求出这个数列的前N项之和,保留两位小数。 ## 解题思路 当我们将分子…… 题解列表 2024年10月11日 1 点赞 0 评论 555 浏览 评分:9.9
暴力解法 菲波那契数列2809 摘要:解题思路:注意事项:参考代码:#includeint main(){ int a,b=0,c=1,d,i=1; scanf("%d",&a); for(i;i<a;i++) {…… 题解列表 2024年10月11日 0 点赞 0 评论 528 浏览 评分:9.9
忽略大小写的字符串比较 摘要:#include <stdio.h>#include <string.h>#include <ctype.h>// 自定义忽略大小写的字符串比较函数int strcasecmp_custom(cons…… 题解列表 2024年10月11日 0 点赞 0 评论 373 浏览 评分:9.9
数字三角形-动态规划 摘要:解题思路:这题可以用动态规划找出状态转移方程,去从下往上遍历每一个元素,最后输出dp[1][1]即可; 注意:这里dp[i][j]表示的是第i行第j列的元素往下走所有路径中最大的和 代码为…… 题解列表 2024年10月11日 1 点赞 0 评论 287 浏览 评分:9.9