The two of the oldest man need cheers
At a company dinner, the drinking rule was that two colleagues of similar age clinked glasses of wine.
Each meal was attended by a different number of people, who listed their ages in an irregular order. Finally, the two oldest people clinked glasses and drink for the first time.
Write a function that takes an array of the ages of the people at the table, returns the ages of the two people who clinked their glasses for the first time, and returns it in order of smallest to largest.
example:
[1,5,87,45,8,8] -> [45,87]
[6,5,83,5,3,18] -> [18,83]
have fun~
The two of the oldest man need cheers的更多相关文章
- kinect (oldest one) (libfreenect with py_kinect) on linux ubuntu14.04 x64
freenect libs Where is the resource? Here :P : https://github.com/OpenKinect/libfreenect To make sur ...
- The Sorrows of Young Werther
The Sorrows of Young Werther J.W. von Goethe Thomas Carlyle and R.D. Boylan Edited by Nathen Haskell ...
- python瓦登尔湖词频统计
#瓦登尔湖词频统计: import string path = 'D:/python3/Walden.txt' with open(path,'r',encoding= 'utf-8') as tex ...
- NCE2
1.A private conversation Last week I went to the theatre. I had a very good seat. The play was very ...
- Download Visual Studio
Welcome to a new way to install Visual Studio! In our newest version, we've made it easier for you t ...
- A1
It’s surprising what you can find at the end of your garden. Wild flowers... and even smaller yet, i ...
- BumpMapping [转]
http://fabiensanglard.net/bumpMapping/index.php Fabien Sanglard's Website Home About FAQ Email Rss T ...
- SDWebImage源码解读之SDWebImageCache(下)
第六篇 前言 我们在SDWebImageCache(上)中了解了这个缓存类大概的功能是什么?那么接下来就要看看这些功能是如何实现的? 再次强调,不管是图片的缓存还是其他各种不同形式的缓存,在原理上都极 ...
- ucos实时操作系统学习笔记——任务间通信(队列)
ucos操作系统中的queue机制同样使用了event机制来实现,其实和前面的sem,mutex实现类似,所不同的是对sem而言,任务想获得信号量,对mutex而言,任务想获得的是互斥锁.任务间通信的 ...
随机推荐
- PHP 输入输出流 php://input 获取表单中2个重名name的值
PHP 输入输出流 php://input 获取表单中2个重名name的值 <?php // PHP有一种"所有IO都是流"的说法. // 压缩流参考 https://w ...
- IDEA远程调试Ambari Server
1.配置端口 Ambari Server默认配置了服务端的debug参数,端口为5005.如果要修改端口,可以在/usr/sbin/ambari_server_main.py文件中对应地方修改,直接改 ...
- Linux Shell/Bash wildcard通配符、元字符、转义符使用
说到shell通配符(wildcard),大家在使用时候会经常用到.下面是一个实例: 1 1 2 3 4 [chengmo@localhost ~/shell]$ ls a.txt b.txt ...
- PHP基于TP5使用Websocket框架之GatewayWorker开发电商平台买家与卖家实时通讯
前段时间公司提了一个新的需求,在商品的详情页要实现站内买家和商品卖家实时通讯的功能以方便沟通促成交易,要开发此功能当时首先考虑到的就是swoole和workerman了,从网上大概了解了一下关于这两款 ...
- AudioToolbox--AudioQueue实现流播放接口
AudioMedia_ios.h // // AudioMedia_ios.h // mmsplayer // // Created by Weiny on 12-4-4. // Copyri ...
- SpringBoot上传文件报错,临时路径不存在
异常信息 报错日志: The temporary upload location [/tmp/tomcat.7957874575370093230.8088/work/Tomcat/localhost ...
- Java 数组实例——实现棋盘落子
五子棋.连连看.俄罗斯方块.扫雷等常见小游戏,都可以通过二维数组实现. 棋盘落子效果图: 源码: package my_package; import java.io.BufferedReader; ...
- H3C 802.11网络的基本元素
- angularcli 第六篇(todolist 列表)
1.通过文本框输入,向数组添加数据 <!-- 通过文本框输入,向数组添加数据 push --> <input type="text" name="111 ...
- php数字字母字符串比较
<?php$a="12a";if($a==12){echo "good";}?>这种情况能输出good,字母在后时只比较前两位,认为是相等:字母在前 ...