有趣的跳跃(c语言简易方法) 摘要:解题思路:注意事项:用到多个数组参考代码:#include<stdio.h>int main(){ int a[3000],b[3000],n,d; scanf("%d",&n); …… 题解列表 2022年11月08日 0 点赞 4 评论 610 浏览 评分:6.0
找出最长的字符串来代码简洁,对新手友好,一看就懂 摘要:```c #include #include int main() { char p[5][100]; int i,o[5],max,k; for (i = 0; i < 5; i…… 题解列表 2022年11月09日 0 点赞 1 评论 287 浏览 评分:6.0
尾递归,大大减少运算时间 摘要:解题思路:递归注意事项:递归但是并不完全是递归,是尾递归,通过对于上次的结果的调用,大大减少运算时间。参考代码:#include <iostream>using namespace std;int a…… 题解列表 2022年11月09日 0 点赞 1 评论 180 浏览 评分:6.0
数组逆序重放(easy) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n,a[101]; cin>>n; for(int…… 题解列表 2022年11月09日 0 点赞 0 评论 606 浏览 评分:6.0
超简单方法之判断是否为两位数 摘要:解题思路:这里有个知识点就是%n,这里输入的时候会自动辨别出其输入的位数。所以直接if结束,听懂掌声注意事项:参考代码:#includeint main(){ int a; int n; …… 题解列表 2022年11月10日 0 点赞 0 评论 525 浏览 评分:6.0
买笔(三for循环) 摘要:解题思路:注意事项:注意要把5放在最外层循环,因为输入10的时候会出现两个5块钱的笔的特殊情况,所以不考虑,因此最先考虑4和6的情况,4放最内层,因为当输入的数为4和6的最小公倍数时,四的除数更大,所…… 题解列表 2022年11月10日 0 点赞 0 评论 380 浏览 评分:6.0
1161: 回文数(二) 摘要:```cpp #include #include using namespace std; void Reverse(char num1[30],char num2[30]); bool C…… 题解列表 2022年11月12日 0 点赞 0 评论 513 浏览 评分:6.0
1163: 排队买票 摘要:```cpp #include using namespace std; int a(int a1,int a2) { if(a2==0) return 1; int pro=a…… 题解列表 2022年11月13日 0 点赞 0 评论 481 浏览 评分:6.0
2755: 类型转换 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ printf("D C\n"); return 0;}…… 题解列表 2022年11月14日 0 点赞 0 评论 1442 浏览 评分:6.0
母牛的故事,数母牛数量 摘要:解题思路:写出每年会产生的母牛数,发现第1,2,3年都是1头,然后从第三年起,第n年产生的母牛数量是第n-1年和第n-3年所产生的母牛数量和。注意事项:1.一开始用递归发现超时了,然后改用了用数组提前…… 题解列表 2022年11月16日 0 点赞 0 评论 241 浏览 评分:6.0