C语言训练-求素数问题(C语言) 摘要:#include<stdio.h> int main() { int n; scanf("%d",&n); int flag = 0; for(int i=2;i<=n…… 题解列表 2023年06月12日 0 点赞 0 评论 278 浏览 评分:0.0
利用递归算法求解猴子吃桃问题 摘要:# 利用递归算法求解猴子吃桃问题 ## 我的代码 ```python from functools import lru_cache @lru_cache(maxsize=1024) #…… 题解列表 2023年06月12日 0 点赞 0 评论 326 浏览 评分:0.0
简单易懂C语言 摘要:#include<stdio.h> int main() { int a = 1, b = 1; int n; scanf("%d", &n); if(n==1){ …… 题解列表 2023年06月11日 0 点赞 0 评论 163 浏览 评分:0.0
C语言训练-字符串正反连接 摘要:#include<stdio.h> int main() { char a[100]; char b[100]; scanf("%s",a); printf("%s",…… 题解列表 2023年06月11日 0 点赞 0 评论 169 浏览 评分:0.0
c语言代码解决问题 摘要:解题思路:为了计算矩形 R1 和 R2 的总面积,我们可以先计算每个矩形的面积,然后减去它们的重叠区域的面积。矩形 R1 的面积可以通过计算底边长度乘以高度来得到,即:area_R1 = (x2 - …… 题解列表 2023年06月11日 1 点赞 1 评论 816 浏览 评分:9.6
c语言代码解决问题 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>#include<ctype.h>int main(){ char str[1001]; …… 题解列表 2023年06月11日 0 点赞 0 评论 216 浏览 评分:0.0
c语言代码解决问题 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<stdlib.h>int main(){ int n, * a,i,plateau_length=1,max_p…… 题解列表 2023年06月11日 0 点赞 0 评论 245 浏览 评分:0.0
自由下落的距离计算 摘要: ## 我的代码 ```python m,n=map(int,input().strip().split()) a=0 b=m #这里将b的初值设为m,因为落下距离容易被忽略,也可以不写…… 题解列表 2023年06月11日 0 点赞 0 评论 290 浏览 评分:0.0
利用递归函数求斐波那契数列 摘要: ##我的代码 ```python def func(n): if n==1: return 1 if n==2: return 2 …… 题解列表 2023年06月11日 0 点赞 0 评论 249 浏览 评分:0.0
编写题解 2943: Vigenère密码 摘要:解题思路:输入-小写转换大写-密文转明文-大写转为小写输出注意事项:套用公式用于大写字母,输出时保留大小写,所以用f[i]标记小写字母;如果k密钥长度不够,用(i%k_len)求;公式:m[i]=c[…… 题解列表 2023年06月11日 0 点赞 1 评论 283 浏览 评分:0.0