The 3n + 1 problem 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int prime(int a){ int c = 0; while (a != 1) { c++; if (a % 2…… 题解列表 2025年02月26日 0 点赞 0 评论 150 浏览 评分:0.0
字符串的输入输出处理 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>#define max 1000int main(){ int n,i=0;…… 题解列表 2025年02月26日 0 点赞 0 评论 396 浏览 评分:0.0
题解 1196: 去掉空格 摘要:#include #include void fun(char str[]){ int j; int length = strlen(str); for (int …… 题解列表 2025年02月26日 2 点赞 0 评论 335 浏览 评分:8.0
贪心算法解决金银岛 摘要:解题思路:注意事项:参考代码:def bravery(data,w): data.sort(key=lambda x:x[2],reverse=True) &n…… 题解列表 2025年02月26日 0 点赞 0 评论 153 浏览 评分:0.0
利用循环得到n次的数字,然后求和 摘要:解题思路:每次循环把上一个值乘10再加上结尾的2注意事项:跳出循环后还需要再算一次和参考代码:int main(){ int a=2,n;&…… 题解列表 2025年02月25日 1 点赞 0 评论 611 浏览 评分:0.0
C语言简单解法 摘要:解题思路:使用fgets来读取字符串,用fgets+strcspn()处理换行 符代替gets()可以避免gets()带来的安全风险。注意事项:注意,fgets()读取后会…… 题解列表 2025年02月25日 0 点赞 0 评论 892 浏览 评分:10.0
土办法。感觉这题目没说仔细 摘要:解题思路:题目并没有说明m,n 的奇偶性,但根据大家发的题解,好像有默认。。我发一个没默认的土办法。:)注意事项:要想清楚在range里的参数范围到底要不要+1参考代码:m,n = map(int,i…… 题解列表 2025年02月25日 0 点赞 0 评论 413 浏览 评分:0.0
用筛法求之N内的素数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int prime(int a[], int i, int j);#define max 1000int main(){ i…… 题解列表 2025年02月25日 0 点赞 0 评论 205 浏览 评分:0.0
栈实现字符串匹配问题 摘要:```cpp#include #include #include using namespace std;bool check_rate(char x,char y){ …… 题解列表 2025年02月25日 0 点赞 0 评论 227 浏览 评分:0.0