元素最大跨度值 用到了max min for循环 摘要:解题思路:注意事项:题目描述给定一个长度为n的非负整数序列,请计算序列的最大跨度值(最大跨度值 = 最大值减去最小值)。输入格式一共2行,第一行为序列的个数n(1 <= n <= 1000),第二行为…… 题解列表 2024年11月04日 0 点赞 0 评论 503 浏览 评分:0.0
C++[竞赛入门]简单的a+b题解 摘要:题目答案: ```cpp #include using namespace std; int main() { int a,b; while(cin>>a>>b)cout…… 题解列表 2024年11月04日 0 点赞 0 评论 776 浏览 评分:0.0
用小学生思路解决此题 摘要:解题思路:枚举注意事项:参考代码:#include<stdio.h>int main(){ int a[10];int i=0,m=1;while(m){ scanf("%d",&a[i]); …… 题解列表 2024年11月04日 0 点赞 0 评论 564 浏览 评分:0.0
2771: 大象喝水(简单) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#define PI 3.14159int main(){ int r,h; double sum=0,num=0; …… 题解列表 2024年11月04日 0 点赞 0 评论 597 浏览 评分:0.0
2773: 计算线段长度(数组解法) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ double a[3],b[3]; double sum=0,num…… 题解列表 2024年11月04日 0 点赞 0 评论 562 浏览 评分:0.0
隨隨便便写一写,我尽量解释清楚这一题我为什么要这么写代码,这是我目前能想到的最详细的解读过程了 解题思路:第一年年底,房价200万,第一年一整年下来,他手头上有了N万;第二年年底,房价200*(1+K*0.01)万【从数学上来说,百分号K可以等于K*0.01】,他今年工资一共N万,加上去年一整年的工资,他手头上有了2*N万;第三年年底, 题解列表 2024年11月05日 0 点赞 0 评论 627 浏览 评分:0.0
多种方法,不使用数组也行 有多种解法,可以先排序,然后直接首尾相减```c#include#includeintcmp(constvoid*a,constvoid*b){return*(int*)a-*(int*)b;}intmain(){intn;scanf("%d", 题解列表 2024年11月05日 0 点赞 0 评论 431 浏览 评分:0.0
高精度加法 摘要:#include"bits/stdc++.h" using namespace std; int main(){ string a1,a2; int b1[20000],b2[…… 题解列表 2024年11月05日 0 点赞 0 评论 419 浏览 评分:0.0
高精度减法 摘要:#include"bits/stdc++.h" using namespace std; int main(){ string s1,s2; int a1[1000]={0},…… 题解列表 2024年11月05日 0 点赞 0 评论 697 浏览 评分:0.0
2858: 整理药名 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>int main() { char a[100][100]; // 定义一个二维数组来存储…… 题解列表 2024年11月05日 0 点赞 0 评论 469 浏览 评分:0.0