1996: 元素配对 摘要:解题思路:很容易想到,当用最大减最小的时候最终的值最大。开辟两组数组,使用冒泡排序依次从小排到大。参考代码:#include <stdio.h> #include <stdlib.h> int…… 题解列表 2021年12月31日 0 点赞 0 评论 681 浏览 评分:9.9
c语言 编写题解 1011: [编程入门]最大公约数与最小公倍数 摘要:解题思路:想简单点注意事项:参考代码:#include<stdio.h>int main(){ int m,n,p,i,j; scanf("%d %d",&n,&m); …… 题解列表 2021年12月31日 0 点赞 0 评论 539 浏览 评分:9.9
老仁的c语言 摘要:解题思路:使用if语句注意事项:注意变量的设定参考代码:#include <stdio.h>#include <stdlib.h>#define m(x,max) max=x/*分别用函数和带参的宏,…… 题解列表 2021年12月31日 0 点赞 1 评论 447 浏览 评分:9.9
1812: [编程基础]输入输出练习之输出图案 摘要:解题思路:注意事项:参考代码:x = str(input()) print(f' {x}') print(f' {x*3} ') print(x*5)…… 题解列表 2021年12月31日 0 点赞 0 评论 2135 浏览 评分:9.9
1848: 求输入数据绝对值 摘要:解题思路:注意事项:参考代码:while True: try: x = input() print('%.2f'%abs(float(x)…… 题解列表 2021年12月31日 0 点赞 0 评论 725 浏览 评分:9.9
1866: 三位数反转 摘要:解题思路:注意事项:参考代码:while True: try: n = input() print(n[::-1]) except: &nb 题解列表 2021年12月31日 0 点赞 1 评论 869 浏览 评分:9.9
1480: 蓝桥杯算法提高VIP-模拟计算器__优质题解 摘要:解题思路:虽然有很多大神写了本题的题解,但是我发现没人提到这道题的严谨性问题,所以我就“多此一举”一下。主要思路就是根据题意模拟。注意事项:首先我用if去做的这道题,因为用题目要求的switch去写,…… 题解列表 2021年12月31日 0 点赞 0 评论 607 浏览 评分:9.9
编写题解 1507: 蓝桥杯算法提高VIP-去注释 c++ 摘要:注意事项:不要大意!参考代码:#include<bits/stdc++.h>using namespace std;int main(){ char c; while ((c = cin.…… 题解列表 2021年12月31日 0 点赞 0 评论 634 浏览 评分:9.9
【C语言题解】三个数的最大值 摘要:解题思路:利用变量max更新最大值,如果a大于max,那么max赋值为a,如果b大于max,max赋值为b。。。。。注意事项: ·第一种情况:如果题目要求输入的三个数a,b,c都大于0,…… 题解列表 2022年01月01日 0 点赞 0 评论 979 浏览 评分:9.9
1004: [递归]母牛的故事 解题思路:其实本质上都是数学问题,我们可以从最简单的观察入手。从第一年第十年,所得牛数依次是1,2,3,4,6,9,13,19,28,41我们可以观察到规律,从第四年起,答案符合f[n]=f[n-1]+f[n-3];代码实现如下:#includeintmain(){intp[56]= 题解列表 2022年01月01日 0 点赞 0 评论 789 浏览 评分:9.9