编写题解 1099: 校门外的树C++ 摘要:```cpp #include /* 文件头可以随便,我喜欢万能头,这里也可以(注意有memset函数,要用cstring库): #include #include */ using …… 题解列表 2024年11月26日 7 点赞 1 评论 880 浏览 评分:8.0
编写题解 1116: IP判断 摘要:```cpp #include #include #include using namespace std; bool judge(string str) { string st…… 题解列表 2024年11月28日 3 点赞 1 评论 406 浏览 评分:8.0
1851利用while和for循环解决 摘要:解题思路:利用while进行输出循环,再利用好for循环将水仙花数进行筛选出来。注意事项:参考代码:#include<stdio.h>#include<math.h>#define N(x) pow(…… 题解列表 2024年12月05日 1 点赞 0 评论 364 浏览 评分:8.0
循环每一位的值,用%10求余+/10更新;初始值比较需要另设n保存 摘要:解题思路:1.循环每一位的值,用%10求余+/10更新。2.中间值需要用count储存,加入if判断。3.while会让原始值降至0,因此初始值的比较需要另设n保存。参考代码:#include<ios…… 题解列表 2024年12月06日 1 点赞 0 评论 225 浏览 评分:8.0
C语言 冒泡排序+一些for循环+重组数组 简单逻辑 好理解 摘要:解题思路: 1.输入 2.冒泡排序,从小到大 &nbs 题解列表 2024年12月08日 0 点赞 0 评论 203 浏览 评分:8.0
小白第一次写个题解 摘要:解题思路: 动态规划,递归注意事项:参考代码:ls = list(input())N = len(ls)f = [0] * (N + 9)#担心越界所以弄大点def get(…… 题解列表 2025年02月05日 5 点赞 0 评论 404 浏览 评分:8.0
好烦,这个小数点的下标烦死 摘要:解题思路:为了写这道题,去看了高精度加减法,一直看到高精度乘法,还去博客看reserve函数和find函数的使用,最后在B站上看老师讲解才大概明白注意事项:参考代码:#include<bits/…… 题解列表 2025年02月15日 2 点赞 0 评论 1082 浏览 评分:8.0
筛选N以内的素数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>intzhishu(inti){&nbs…… 题解列表 2025年02月18日 0 点赞 0 评论 714 浏览 评分:8.0
题解 1196: 去掉空格 摘要:#include #include void fun(char str[]){ int j; int length = strlen(str); for (int …… 题解列表 2025年02月26日 2 点赞 0 评论 424 浏览 评分:8.0
C++:vector容器简单使用方法_练习 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<vector>using namespace std ;void ko( vector<…… 题解列表 2025年03月26日 0 点赞 0 评论 328 浏览 评分:8.0