题目描述
任意输入n个整数,把它们的最大值,最小值求出来。
输入只有一行,包括一个整数n(1<=n<=20),后面跟着n个数。
输出
输出只有一行,包括2个整数。
样例输入
5 1 99 3 6 0
样例输出
99 0
提示:
本题只需要找出n个整数中的最值,因此并不需要排序,只要用打擂法比较即可
参考程序和运行结果
特别声明:以上内容(如有图片或视频亦包括在内)为自媒体平台“网易号”用户上传并发布,本平台仅提供信息存储服务。
Notice: The content above (including the pictures and videos if any) is uploaded and posted by a user of NetEase Hao, which is a social media platform and only provides information storage services.