优质题解 【C语言】数字游戏:从暴力循环到精简代码 - DotcppXF 摘要:【解题思路】 将题目描述的游戏规则转化为数学规律问题,不断优化代码,解决【时间超限】和【数据超范围】两大难点。【1】常规解法(暴力循环求解) ① 直接按题目描述的规则写代码…… 题解列表 2022年10月04日 3 点赞 5 评论 1763 浏览 评分:10.0
报数问题的C++解法--暴力 摘要:解题思路:首先,输入该循环链表,在头结点指向为空时,即链表为空时,新增节点的指向就是其本身。以后新增节点以后,指针域保存的是第一个结点的地址。其次,进行排除。设置两个指针,分别为prev和p。p是pr…… 题解列表 2022年10月04日 0 点赞 0 评论 578 浏览 评分:9.5
1020-猴子吃桃的问题 数据结构:数组 语言:C++ 摘要:解题思路:注意事项:参考代码:/*a[]数组存储每一天桃子的剩余量。a[i]表示第i天桃子的剩余量。 a[i]=a[i-1]-(a[i-1]/2+1) => a[i-1]=2(a[i]+1)*/#in…… 题解列表 2022年10月04日 0 点赞 0 评论 330 浏览 评分:0.0
1019-自由下落的距离计算 语言:C++ 摘要:解题思路:注意事项:参考代码:/*/2:n次求和:前n-1次 */#include<iostream>using namespace std;int main(){ double m; int n; …… 题解列表 2022年10月04日 0 点赞 0 评论 269 浏览 评分:0.0
编写题解 2084: 蓝桥杯基础练习-特殊回文数 摘要:import java.util.Scanner; public class Main { public static void main(String[] args) { …… 题解列表 2022年10月04日 0 点赞 0 评论 362 浏览 评分:9.9
1018-有规律的数列求和 语言:C++ 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n; cin >>n; int a[n]={2,3},b[n]…… 题解列表 2022年10月04日 0 点赞 0 评论 268 浏览 评分:0.0
1017-完数的判断 语言:C++ 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n; cin >>n; for(int i=2;i…… 题解列表 2022年10月04日 0 点赞 0 评论 307 浏览 评分:0.0
1016-水仙花数判断 语言:C++ 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cmath>using namespace std;int main(){ int a,b,c=3; …… 题解列表 2022年10月04日 0 点赞 0 评论 311 浏览 评分:0.0
1015-求和训练 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;typedef long long LL;LL sum(int a){ LL res=0; f…… 题解列表 2022年10月04日 0 点赞 0 评论 269 浏览 评分:0.0
实数的打印(java暴力) 摘要:解题思路:注意事项:参考代码: import java.util.Scanner; public class Main{ public static void main(Strin…… 题解列表 2022年10月04日 0 点赞 1 评论 326 浏览 评分:9.9