简洁:找规律 摘要:解题思路:比较两个字符,若这两个字符相等,那么不必操作,若这两个字符不等,则比较后面两个字符串的后一位,如也相等,则替换,否则,删除,同时操作数加1。参考代码:#include <bits/stdc+…… 题解列表 2023年06月01日 0 点赞 0 评论 615 浏览 评分:0.0
比较麻烦但是比较好想的C语言代码 摘要:解题思路:注意事项:参考代码: #include<stdio.h> #include<math.h> #include<string.h> int Max(int num[]) { in…… 题解列表 2023年06月01日 0 点赞 1 评论 398 浏览 评分:0.0
很简单的c++方法写的代码 清晰的思路 希望大佬们可以一起讨论 #includeusingnamespacestd;#includeintmain(){inta;intsum=0;cin>>a;inttemp=a;while(a){sum+=((int)pow(a%10,3));a/=10;}if(temp==sum){cout 题解列表 2023年06月01日 0 点赞 0 评论 643 浏览 评分:0.0
输出所有的水仙花数 摘要://判断一个数是否为"水仙花数", //所谓"水仙花数"是指这样的一个数:首先是一个三位数,其次,其各位数字的立方和等于该数本身。 //例如:371是一个"水仙花数",371=3^3+7^3+1^…… 题解列表 2023年06月01日 0 点赞 0 评论 528 浏览 评分:0.0
二级C语言-求偶数和 摘要:#include<stdio.h> int main(){ int n; scanf("%d",&n); int a[n]; int i = 0; for(i = 0;…… 题解列表 2023年06月01日 0 点赞 0 评论 457 浏览 评分:0.0
二级C语言-等差数列 摘要://sum=2+5+8+11+14+…,输入正整数n,求sum的前n项和。 #include<stdio.h> int main(){ int a = 2; int n; …… 题解列表 2023年06月01日 0 点赞 0 评论 492 浏览 评分:0.0
有规律的数列求和 摘要:解题思路:注意事项:参考代码:public class Main { public static void main(String[] args) { Scanner sc = n…… 题解列表 2023年06月01日 0 点赞 0 评论 554 浏览 评分:0.0
编写题解 2917: 奇数单增序列 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int a[1000],b[500];int main(){ int n,i,j=0; scanf("%d",&n); //输入 fo…… 题解列表 2023年06月01日 0 点赞 0 评论 546 浏览 评分:0.0
c语言代码解决问题 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n, a[100], i; float sum_1 = 0.0, sum_2 = 0.0, …… 题解列表 2023年06月01日 0 点赞 0 评论 515 浏览 评分:0.0
反向搜索,以终点为起点,广度优先搜索 摘要:解题思路:反向搜索,以终点为起点,广度优先搜索用mp<pair,vector<pari>>来存储某个点存放的门注意事项:在搜索四个方向后,再加上这个点拥有的门,其他的与广搜无异参考代码:#includ…… 题解列表 2023年06月01日 0 点赞 0 评论 786 浏览 评分:0.0