看看得了,暴力求解 解题思路:我是小白,整体思路是两行字符串,从第一行字符串中第一个和第二行字符串第一个开始比较,相等一起往后移,并且计数加1,不相等第一行回到第一个字符串,第二行字符串回到最开始字符串加1的位置,又继续开始比较。第一行第一个字符串开始和第二行所有字符串比完了, 题解列表 2023年09月06日 0 点赞 0 评论 712 浏览 评分:0.0
求整数的和与均值 摘要:参考代码: ```c #include int main() { int n; scanf("%d",&n); int a; double sum=0; for(int i=…… 题解列表 2023年09月06日 0 点赞 1 评论 591 浏览 评分:0.0
整数的个数 摘要:解题思路:注意事项:scanf_s改为scanf参考代码:int k,i; int a=0,b=0,c=0; int arr[1000]; scanf_s("%d",&k); for ( i = 0;…… 题解列表 2023年09月07日 0 点赞 0 评论 554 浏览 评分:0.0
人口增长问题 摘要:参考代码: ```c #include int main() { int n; double x;//记得设浮点型,不然输出可能有问题 scanf("%lf%d",&x,&n); …… 题解列表 2023年09月08日 0 点赞 0 评论 607 浏览 评分:0.0
超级简单的代码,比较吃算法 摘要:解题思路:就是这个东西可以抽象成一个递推a[1]=0;a[i]=(a[i-1]+3) %i; (i>1)注意事项:参考代码:#include<stdio.h>int main(){ int n;int…… 题解列表 2023年09月08日 0 点赞 0 评论 561 浏览 评分:0.0
这个题题目是敏感词汇(注意变量类型) 注意事项:%0.0lf会对浮点数四舍五入%0.0f会直接舍弃小数部分%d输出浮点类型可能会出错参考代码:```c#includeintmain(){inty;doublem,r;scanf("%lf%lf%d",&r,&m,&y);for(inti=0;i 题解列表 2023年09月08日 0 点赞 0 评论 562 浏览 评分:0.0
买房子(用while时,小心时间超限) 摘要:参考代码: ```c #include int main() { int n,sum1; double sum2=200,k; scanf("%d%lf",&n,&k); su…… 题解列表 2023年09月08日 0 点赞 0 评论 741 浏览 评分:0.0
菲波那契数列(数组) 摘要:参考代码: ```c #include int main() { int k; scanf("%d",&k); int a[k]; for(int i=0;i…… 题解列表 2023年09月08日 0 点赞 0 评论 684 浏览 评分:0.0
用递归调用解决猴子吃桃 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int n;int f(int x){//递归,每次都跟后一天有关 if(x==n){ return 1; }else{ retu…… 题解列表 2023年09月09日 0 点赞 0 评论 564 浏览 评分:0.0
1017: [编程入门]完数的判断 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int wan(int x){ int sum=0; for(int…… 题解列表 2023年09月09日 0 点赞 0 评论 514 浏览 评分:0.0