编写题解 2798: 整数序列的元素最大跨度值 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ long long n,maxx=-1e18,minn…… 题解列表 2024年12月22日 0 点赞 0 评论 374 浏览 评分:0.0
2798: 整数序列的元素最大跨度值(详细注释) 摘要:解题思路:注意事项:参考代码://解题思路:最大跨度=最大值-最小值,因而只要求出最大值与最小值,此题就迎刃而解了。 #include <stdio.h> int main() { i…… 题解列表 2024年12月20日 2 点赞 0 评论 311 浏览 评分:0.0
送分了........ 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int max=0,min=1000,a,b; scanf("%d",&a); while(a…… 题解列表 2024年11月26日 0 点赞 0 评论 171 浏览 评分:0.0
元素最大跨度值 用到了max min for循环 摘要:解题思路:注意事项:题目描述给定一个长度为n的非负整数序列,请计算序列的最大跨度值(最大跨度值 = 最大值减去最小值)。输入格式一共2行,第一行为序列的个数n(1 <= n <= 1000),第二行为…… 题解列表 2024年11月04日 0 点赞 0 评论 128 浏览 评分:0.0
好理解的答案:关于函数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int max(int x , int y ){ int d; d=x>y?x:y ; return d ; }int min(…… 题解列表 2024年11月04日 0 点赞 0 评论 112 浏览 评分:0.0
整数序列的元素最大跨度值 C++ 摘要:解题思路:注意事项:参考代码:#include<iomanip>#include<string>#include<iostream>#include<algorithm>#include<cmath>…… 题解列表 2022年12月08日 0 点赞 0 评论 243 浏览 评分:0.0
整数序列的元素最大跨度值(max,min) 摘要:解题思路:注意事项:参考代码:n = int(input())l = list(input().split())t = [int(i) for i in l]print(max(t) - min(t)…… 题解列表 2024年07月29日 0 点赞 0 评论 144 浏览 评分:0.0
python 2798: 整数序列的元素最大跨度值 摘要:参考代码:n = input() arr = list(map(int, input().split())) print(max(arr)-min(arr))…… 题解列表 2024年03月12日 0 点赞 0 评论 236 浏览 评分:0.0
2798: 整数序列的元素最大跨度值 摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() { int n,max=0,min=0; …… 题解列表 2023年11月15日 0 点赞 0 评论 96 浏览 评分:0.0
复习排序(本题用最后一种方法,前几个也可以) 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n; cin >> n; int a[n],i=-1…… 题解列表 2024年03月03日 0 点赞 0 评论 122 浏览 评分:0.0