题解 | #统计牛客网数据#

统计牛客网数据

https://www.nowcoder.com/practice/5abf64ac972f4a8083940df7a33fe18d

def main():
    s1 = input()
    try:
        lists = s1.split(' ')
        lists = list(filter(lambda x: x, lists)) #过滤掉空字符
        lists = [int(item) for item in lists] #转为int的数组
        
        r1 = max(lists)
        r2 = min(lists)
        r3 = sum(lists)
        
        print(r1)
        print(r2)
        print(r3)
    except Exception as e:
        print(str(e))


if __name__ == '__main__':
    main()

全部评论

相关推荐

昨天 13:16
湖南工学院 Java
点赞 评论 收藏
分享
程序员小白条:找的太晚,别人都是大三实习,然后大四秋招春招的,你大四下了才去实习,晚1年
点赞 评论 收藏
分享
05-29 22:11
门头沟学院 Java
Elastic90:抛开学历造假不谈,这公司的招聘需求也挺怪的,Java开发还要求你有图文识别、移动端开发和c++的经验,有点逆天了。
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务