数组乘常数—2^(n+1)-2 摘要:解题思路:汉罗双塔的次数为2*2(^(n)-1);注意事项:参考代码:#include <stdio.h> #include <malloc.h> #include <string.h> int…… 题解列表 2022年09月13日 0 点赞 0 评论 568 浏览 评分:10.0
优质题解 【C语言】数字游戏:从暴力循环到精简代码 - DotcppXF 摘要:【解题思路】 将题目描述的游戏规则转化为数学规律问题,不断优化代码,解决【时间超限】和【数据超范围】两大难点。【1】常规解法(暴力循环求解) ① 直接按题目描述的规则写代码…… 题解列表 2022年10月04日 3 点赞 5 评论 1862 浏览 评分:10.0
实数的打印 摘要: #include #include #include using namespace std; int main() { floa…… 题解列表 2022年10月12日 2 点赞 0 评论 403 浏览 评分:10.0
递归标准题解 摘要:解题思路:注意事项:参考代码:#include<stdio.h>void f(int i,int x);int s[100]={0}; int s1[100]={0}; //s1[-1]=0; int…… 题解列表 2022年10月19日 0 点赞 0 评论 438 浏览 评分:10.0
[编程入门]矩阵对角线求和,最容易理解的解法,非常暴力 摘要:解题思路:注意事项:没有丝毫含金量参考代码:x=list(map(int,input().split()))y=list(map(int,input().split()))z=list(map(int…… 题解列表 2022年10月23日 2 点赞 0 评论 1123 浏览 评分:10.0
aaaaaaaaaaaaaaaaaaa 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int n; scanf("%d",&n); while(n--) …… 题解列表 2022年10月24日 0 点赞 0 评论 400 浏览 评分:10.0
二级C语言-平均值计算 摘要:``` #include using namespace std; int main() { int arr[10], sum = 0; for (int i = 0; …… 题解列表 2022年10月26日 1 点赞 0 评论 367 浏览 评分:10.0
全排列解决排队买票 摘要:解题思路:由题目可知,1元小孩通过,售票员手里的零钱+1,2元的小孩通过,售票员的零钱-1,初始的零钱数目是0。不妨把1元的小孩设成1,把2元的小孩设成-1,建立一个由n个1和k个-1组成的m元动态数…… 题解列表 2022年11月04日 1 点赞 0 评论 670 浏览 评分:10.0
完数的判断(Python) 摘要:解题思路:注意事项:要保证时间限制的情况下不能通过暴力求解参考代码:N = int(input())for i in range(2, N) : lst_factors = [1] lim…… 题解列表 2022年11月04日 1 点赞 0 评论 539 浏览 评分:10.0
这么简单的题还属于中档题? 摘要:解题思路:基本操作注意事项:这有什么注意的,直接五星好评参考代码:#include<stdio.h>int main(){ int a,b; scanf("%d %d",&a,&b); …… 题解列表 2022年11月09日 1 点赞 0 评论 1223 浏览 评分:10.0