整数序列的元素最大跨度值(max,min) 解题思路:注意事项:参考代码:n=int(input())l=list(input().split())t=[int(i)foriinl]print(max(t)-min(t)) 题解列表 2024年07月29日 0 点赞 0 评论 484 浏览 评分:0.0
方法:一次遍历找双极值 解题思路:注意事项:参考代码:#includeintmain(){intn=0;scanf("%d",&n);intscores[1000];//数组大小改为1000,满足题目n≤1000的要求for(inti=0;i 题解列表 2025年12月23日 0 点赞 0 评论 295 浏览 评分:0.0 遍历加绝对值 解题思路:用小学手拉手的思路,即n个人,两人拉手有n的阶乘种方法,即n!,现如今就遍历这n!种情况,要用到双重for循环注意事项:注意双重for循环的数组中的变量,还有取绝对值表示跨度参考代码:#include#includeintmain(){intn;intx;i 题解列表 2025年10月08日 0 点赞 0 评论 352 浏览 评分:0.0 2798 整数序列的元素最大跨度值 解题思路:求整数序列的最大跨度值(最大值减去最小值)注意事项:最大值用if(x>max),最小值用if(xintmain(){intn,nums, 题解列表 2025年08月02日 0 点赞 0 评论 388 浏览 评分:0.0 2025/7/26刷题记录 摘要:解题思路:找最大值 初始值为限制内最小值 找最小值 初始值找限制内最大值注意事项:参考代码:#include<stdio.h>int main(){ &…… 题解列表 2025年07月26日 0 点赞 0 评论 329 浏览 评分:0.0 题解 2798: 整数序列的元素最大跨度值 解题思路:注意事项:参考代码:#include#includeintmain(){inta,b[1000],max,min;scanf("%d",&a);for(inti=0;i 题解列表 2025年01月25日 0 点赞 0 评论 444 浏览 评分:0.0 2798: 整数序列的元素最大跨度值(详细注释) 摘要:解题思路:注意事项:参考代码://解题思路:最大跨度=最大值-最小值,因而只要求出最大值与最小值,此题就迎刃而解了。 #include <stdio.h> int main() { i…… 题解列表 2024年12月20日 2 点赞 0 评论 670 浏览 评分:0.0 送分了........ 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int max=0,min=1000,a,b; scanf("%d",&a); while(a…… 题解列表 2024年11月26日 0 点赞 0 评论 438 浏览 评分:0.0 元素最大跨度值 用到了max min for循环 摘要:解题思路:注意事项:题目描述给定一个长度为n的非负整数序列,请计算序列的最大跨度值(最大跨度值 = 最大值减去最小值)。输入格式一共2行,第一行为序列的个数n(1 <= n <= 1000),第二行为…… 题解列表 2024年11月04日 0 点赞 0 评论 492 浏览 评分: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 评论 388 浏览 评分:0.0 « 12 »
遍历加绝对值 解题思路:用小学手拉手的思路,即n个人,两人拉手有n的阶乘种方法,即n!,现如今就遍历这n!种情况,要用到双重for循环注意事项:注意双重for循环的数组中的变量,还有取绝对值表示跨度参考代码:#include#includeintmain(){intn;intx;i 题解列表 2025年10月08日 0 点赞 0 评论 352 浏览 评分:0.0
2798 整数序列的元素最大跨度值 解题思路:求整数序列的最大跨度值(最大值减去最小值)注意事项:最大值用if(x>max),最小值用if(xintmain(){intn,nums, 题解列表 2025年08月02日 0 点赞 0 评论 388 浏览 评分:0.0
2025/7/26刷题记录 摘要:解题思路:找最大值 初始值为限制内最小值 找最小值 初始值找限制内最大值注意事项:参考代码:#include<stdio.h>int main(){ &…… 题解列表 2025年07月26日 0 点赞 0 评论 329 浏览 评分:0.0
题解 2798: 整数序列的元素最大跨度值 解题思路:注意事项:参考代码:#include#includeintmain(){inta,b[1000],max,min;scanf("%d",&a);for(inti=0;i 题解列表 2025年01月25日 0 点赞 0 评论 444 浏览 评分:0.0 2798: 整数序列的元素最大跨度值(详细注释) 摘要:解题思路:注意事项:参考代码://解题思路:最大跨度=最大值-最小值,因而只要求出最大值与最小值,此题就迎刃而解了。 #include <stdio.h> int main() { i…… 题解列表 2024年12月20日 2 点赞 0 评论 670 浏览 评分:0.0 送分了........ 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int max=0,min=1000,a,b; scanf("%d",&a); while(a…… 题解列表 2024年11月26日 0 点赞 0 评论 438 浏览 评分:0.0 元素最大跨度值 用到了max min for循环 摘要:解题思路:注意事项:题目描述给定一个长度为n的非负整数序列,请计算序列的最大跨度值(最大跨度值 = 最大值减去最小值)。输入格式一共2行,第一行为序列的个数n(1 <= n <= 1000),第二行为…… 题解列表 2024年11月04日 0 点赞 0 评论 492 浏览 评分: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 评论 388 浏览 评分:0.0 « 12 »
2798: 整数序列的元素最大跨度值(详细注释) 摘要:解题思路:注意事项:参考代码://解题思路:最大跨度=最大值-最小值,因而只要求出最大值与最小值,此题就迎刃而解了。 #include <stdio.h> int main() { i…… 题解列表 2024年12月20日 2 点赞 0 评论 670 浏览 评分:0.0
送分了........ 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int max=0,min=1000,a,b; scanf("%d",&a); while(a…… 题解列表 2024年11月26日 0 点赞 0 评论 438 浏览 评分:0.0
元素最大跨度值 用到了max min for循环 摘要:解题思路:注意事项:题目描述给定一个长度为n的非负整数序列,请计算序列的最大跨度值(最大跨度值 = 最大值减去最小值)。输入格式一共2行,第一行为序列的个数n(1 <= n <= 1000),第二行为…… 题解列表 2024年11月04日 0 点赞 0 评论 492 浏览 评分: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 评论 388 浏览 评分:0.0