首页 > 试题广场 >

小乐乐算最高分

[编程题]小乐乐算最高分
  • 热度指数:6081 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 256M,其他语言512M
  • 算法知识视频讲解
小乐乐的老师BoBo想知道班级中谁的数学成绩最高,请编程帮他实现。

输入描述:
共两行
第一行输入一个数n,代表小乐乐的班级中n个同学。
第二行输入n个数,用空格相隔,代表班级中每个人的数学成绩。


输出描述:
一个整数,代表班级中最高的数学成绩。
示例1

输入

3
99 89 39

输出

99
a = int(input())
list1 = list(map(int,input().split()))
list1.sort(reverse=True)
print(list1[0])

发表于 2020-11-26 13:49:34 回复(0)
n = eval(input(""))
big = list(input("").split())
c =0
for i in range(n):
    if eval(big[i]) > c:
        c = eval(big[i])
print(c)

发表于 2020-10-08 18:56:39 回复(0)
n = int(input())
score = list(map(int,input().split()))
print(max(score))

发表于 2020-10-06 16:16:24 回复(1)